forked from bartvdbraak/blender
bge fix: debug text didn't have GL_DEPTH disabled - text got clipped when we have objects too close to the camera
fix only in embed bge, blenderplayer seems to be doing differently. -- reported live by Mike Pan
This commit is contained in:
parent
0fb785aaa7
commit
e46895811e
@ -146,13 +146,13 @@ void BL_print_game_line(int fontid, const char* text, int size, int dpi, float*
|
|||||||
BLF_draw(fontid, (char *)text, strlen(text));
|
BLF_draw(fontid, (char *)text, strlen(text));
|
||||||
|
|
||||||
BLF_disable(fontid, BLF_MATRIX|BLF_ASPECT);
|
BLF_disable(fontid, BLF_MATRIX|BLF_ASPECT);
|
||||||
glEnable(GL_DEPTH_TEST);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BL_print_gamedebug_line(const char* text, int xco, int yco, int width, int height)
|
void BL_print_gamedebug_line(const char* text, int xco, int yco, int width, int height)
|
||||||
{
|
{
|
||||||
/* gl prepping */
|
/* gl prepping */
|
||||||
DisableForText();
|
DisableForText();
|
||||||
|
glDisable(GL_DEPTH_TEST);
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
@ -181,6 +181,7 @@ void BL_print_gamedebug_line_padded(const char* text, int xco, int yco, int widt
|
|||||||
* behind quite as neatly as we'd have wanted to. I don't know
|
* behind quite as neatly as we'd have wanted to. I don't know
|
||||||
* what cause it, though :/ .*/
|
* what cause it, though :/ .*/
|
||||||
DisableForText();
|
DisableForText();
|
||||||
|
glDisable(GL_DEPTH_TEST);
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
Loading…
Reference in New Issue
Block a user