Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArystanbek Dyussenov <arystan.d@gmail.com>2009-09-15 22:01:18 +0400
committerArystanbek Dyussenov <arystan.d@gmail.com>2009-09-15 22:01:18 +0400
commit816377cc02fe5dd4be945c0f3d415861114b4980 (patch)
tree306e9d1363aa66bc919e43b80b3380fab9f60ea9 /source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
parentc8af263e5d8d9d41a757e8438cdcf3b64d57e0c0 (diff)
parentee768ada680ce0a8aa184c882005c0ef1c0140fb (diff)
Undo revision 23130 which was a merge with 2.5, a messy one because I did something wrong (`svn status` output: http://www.pasteall.org/7887).soc-2009-kazanbas
The command: svn merge -r 23130:23129 https://svn.blender.org/svnroot/bf-blender/branches/soc-2009-kazanbas
Diffstat (limited to 'source/gameengine/BlenderRoutines/KX_BlenderGL.cpp')
-rw-r--r--source/gameengine/BlenderRoutines/KX_BlenderGL.cpp34
1 files changed, 23 insertions, 11 deletions
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
index dba6d1113c9..5cf696fe146 100644
--- a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
+++ b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
@@ -103,8 +103,6 @@ void BL_SwapBuffers(wmWindow *win)
void DisableForText()
{
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); /* needed for texture fonts otherwise they render as wireframe */
-
if(glIsEnabled(GL_BLEND)) glDisable(GL_BLEND);
if(glIsEnabled(GL_ALPHA_TEST)) glDisable(GL_ALPHA_TEST);
@@ -137,25 +135,32 @@ void DisableForText()
}
}
-void BL_print_gamedebug_line(const char* text, int xco, int yco, int width, int height)
+void BL_print_gamedebug_line(char* text, int xco, int yco, int width, int height)
{
/* gl prepping */
DisableForText();
+ //glDisable(GL_TEXTURE_2D);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
-
- glOrtho(0, width, 0, height, -100, 100);
-
+
+ glOrtho(0, width,
+ 0, height, 0, 1);
+
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
+ glMatrixMode(GL_TEXTURE);
+ glPushMatrix();
+ glLoadIdentity();
/* the actual drawing */
glColor3ub(255, 255, 255);
- BLF_draw_default(xco, height-yco, 0.0f, (char *)text);
+ BLF_draw_default(xco, height-yco, 0.0f, text);
+ glMatrixMode(GL_TEXTURE);
+ glPopMatrix();
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
@@ -163,29 +168,36 @@ void BL_print_gamedebug_line(const char* text, int xco, int yco, int width, int
glEnable(GL_DEPTH_TEST);
}
-void BL_print_gamedebug_line_padded(const char* text, int xco, int yco, int width, int height)
+void BL_print_gamedebug_line_padded(char* text, int xco, int yco, int width, int height)
{
/* This is a rather important line :( The gl-mode hasn't been left
* behind quite as neatly as we'd have wanted to. I don't know
* what cause it, though :/ .*/
DisableForText();
+ //glDisable(GL_TEXTURE_2D);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
- glOrtho(0, width, 0, height, -100, 100);
+ glOrtho(0, width,
+ 0, height, 0, 1);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
+ glMatrixMode(GL_TEXTURE);
+ glPushMatrix();
+ glLoadIdentity();
/* draw in black first*/
glColor3ub(0, 0, 0);
- BLF_draw_default(xco+2, height-yco-2, 0.0f, (char *)text);
+ BLF_draw_default(xco+1, height-yco-1, 0.0f, text);
glColor3ub(255, 255, 255);
- BLF_draw_default(xco, height-yco, 0.0f, (char *)text);
+ BLF_draw_default(xco, height-yco, 0.0f, text);
+ glMatrixMode(GL_TEXTURE);
+ glPopMatrix();
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);