removed some leftover debug code, re-added drawText and getTextSize ag functions
git-svn-id: svn://anubis/anaglym/trunk@194 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
parent
aaa0cda3a5
commit
a2205bce3b
45
Engine.cc
45
Engine.cc
@ -528,51 +528,6 @@ void Engine::getScreenSize(int * width, int * height)
|
|||||||
void Engine::drawText(const char * text, GLfloat r, GLfloat g, GLfloat b,
|
void Engine::drawText(const char * text, GLfloat r, GLfloat g, GLfloat b,
|
||||||
int ptsize, float x, float y)
|
int ptsize, float x, float y)
|
||||||
{
|
{
|
||||||
{ // sanity check framebuffer and env info
|
|
||||||
printf("GL err was %04x\n", glGetError());
|
|
||||||
|
|
||||||
GLint r, g, b, a, depth, sten, aux, dbl;
|
|
||||||
glGetIntegerv(GL_RED_BITS, &r);
|
|
||||||
glGetIntegerv(GL_GREEN_BITS, &g);
|
|
||||||
glGetIntegerv(GL_BLUE_BITS, &b);
|
|
||||||
glGetIntegerv(GL_ALPHA_BITS, &a);
|
|
||||||
glGetIntegerv(GL_DEPTH_BITS, &depth);
|
|
||||||
glGetIntegerv(GL_STENCIL_BITS, &sten);
|
|
||||||
glGetIntegerv(GL_AUX_BUFFERS, &aux);
|
|
||||||
glGetIntegerv(GL_DOUBLEBUFFER, &dbl);
|
|
||||||
printf("framebuffer: rgba %d %d %d %d, depth %d, stencil %d, aux bfr %d, double bfr %d\n",
|
|
||||||
r, g, b, a, depth, sten, aux, dbl);
|
|
||||||
|
|
||||||
GLint a_test, a_func; float a_ref;
|
|
||||||
glGetIntegerv(GL_ALPHA_TEST, &a_test);
|
|
||||||
glGetIntegerv(GL_ALPHA_TEST_FUNC, &a_func);
|
|
||||||
glGetFloatv(GL_ALPHA_TEST_REF, &a_ref);
|
|
||||||
printf("alpha testing: %d, func %04x ref %f\n", a_test, a_func, a_ref);
|
|
||||||
|
|
||||||
GLint blend, b_src, b_equ, b_dst;
|
|
||||||
GLfloat b_c[4];
|
|
||||||
glGetIntegerv(GL_BLEND, &blend);
|
|
||||||
glGetIntegerv(GL_BLEND_SRC, &b_src);
|
|
||||||
glGetIntegerv(GL_BLEND_EQUATION, &b_equ);
|
|
||||||
glGetIntegerv(GL_BLEND_DST, &b_dst);
|
|
||||||
glGetFloatv(GL_BLEND_COLOR, b_c);
|
|
||||||
printf("blending: %d, src %04x equ %04x dst %04x color %.2f %.2f %.2f %.2f\n",
|
|
||||||
blend, b_src, b_equ, b_dst, b_c[0], b_c[1], b_c[2], b_c[3]);
|
|
||||||
|
|
||||||
GLint logic, logmode, mask[4], cull, cullmode, front, draw;
|
|
||||||
glGetIntegerv(GL_COLOR_LOGIC_OP, &logic);
|
|
||||||
glGetIntegerv(GL_LOGIC_OP_MODE, &logmode);
|
|
||||||
glGetIntegerv(GL_COLOR_WRITEMASK, mask);
|
|
||||||
glGetIntegerv(GL_CULL_FACE, &cull);
|
|
||||||
glGetIntegerv(GL_CULL_FACE_MODE, &cullmode);
|
|
||||||
glGetIntegerv(GL_FRONT_FACE, &front);
|
|
||||||
glGetIntegerv(GL_DRAW_BUFFER, &draw);
|
|
||||||
printf("draw env: logic %d logmode %04x, mask %d %d %d %d, cull %d cullmode %04x frontface %04x, drawbuffer %04x\n",
|
|
||||||
logic, logmode, mask[0], mask[1], mask[2], mask[3], cull, cullmode, front, draw);
|
|
||||||
|
|
||||||
printf("GL err was %04x\n", glGetError());
|
|
||||||
printf("***\n");
|
|
||||||
}
|
|
||||||
checkGLError();
|
checkGLError();
|
||||||
m_font->FaceSize(ptsize);
|
m_font->FaceSize(ptsize);
|
||||||
glPushAttrib(GL_ENABLE_BIT | GL_TEXTURE_BIT);
|
glPushAttrib(GL_ENABLE_BIT | GL_TEXTURE_BIT);
|
||||||
|
2
ag.cc
2
ag.cc
@ -24,11 +24,13 @@ namespace ag
|
|||||||
{ "clearEventHandler", clearEventHandler },
|
{ "clearEventHandler", clearEventHandler },
|
||||||
{ "doPhysics", doPhysics },
|
{ "doPhysics", doPhysics },
|
||||||
{ "drawObjects", drawObjects },
|
{ "drawObjects", drawObjects },
|
||||||
|
{ "drawText", drawText },
|
||||||
{ "elapsedTime", elapsedTime },
|
{ "elapsedTime", elapsedTime },
|
||||||
{ "endFrame", endFrame },
|
{ "endFrame", endFrame },
|
||||||
{ "exit", exit },
|
{ "exit", exit },
|
||||||
{ "getCamera", getCamera },
|
{ "getCamera", getCamera },
|
||||||
{ "getScreenSize", getScreenSize },
|
{ "getScreenSize", getScreenSize },
|
||||||
|
{ "getTextSize", getTextSize },
|
||||||
{ "import", import },
|
{ "import", import },
|
||||||
{ "isKeyDown", isKeyDown },
|
{ "isKeyDown", isKeyDown },
|
||||||
{ "loadModel", loadModel },
|
{ "loadModel", loadModel },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user