From a2205bce3b360e7ebec2332758b9bf3637a0da33 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 25 Nov 2009 00:50:47 +0000 Subject: [PATCH] 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 --- Engine.cc | 45 --------------------------------------------- ag.cc | 2 ++ 2 files changed, 2 insertions(+), 45 deletions(-) diff --git a/Engine.cc b/Engine.cc index fe797d5..53a1443 100644 --- a/Engine.cc +++ b/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, 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(); m_font->FaceSize(ptsize); glPushAttrib(GL_ENABLE_BIT | GL_TEXTURE_BIT); diff --git a/ag.cc b/ag.cc index aed70fe..b2a925e 100644 --- a/ag.cc +++ b/ag.cc @@ -24,11 +24,13 @@ namespace ag { "clearEventHandler", clearEventHandler }, { "doPhysics", doPhysics }, { "drawObjects", drawObjects }, + { "drawText", drawText }, { "elapsedTime", elapsedTime }, { "endFrame", endFrame }, { "exit", exit }, { "getCamera", getCamera }, { "getScreenSize", getScreenSize }, + { "getTextSize", getTextSize }, { "import", import }, { "isKeyDown", isKeyDown }, { "loadModel", loadModel },