diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2010-09-07 01:24:10 +0400 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2010-09-07 01:26:15 +0400 |
commit | 0f355bdade1f72ec3b4759504e1fe42e01022089 (patch) | |
tree | 4e1c7e6f652d4f02a1c8a38fcb71064428882c5e /overlay_gl | |
parent | a8a21296f2f04597053498b4d138ec4373c615bf (diff) |
Only disable GL_TEXTURE_GEN_* if they're already enabled. Fixes black screen issue with EVE on OSX (via Cider)
Diffstat (limited to 'overlay_gl')
-rw-r--r-- | overlay_gl/overlay.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/overlay_gl/overlay.c b/overlay_gl/overlay.c index e522c3e34..dba340d3c 100644 --- a/overlay_gl/overlay.c +++ b/overlay_gl/overlay.c @@ -262,7 +262,7 @@ static void drawOverlay(Context *ctx, unsigned int width, unsigned int height) { } if ((ctx->uiWidth != width) || (ctx->uiHeight != height)) { - ods("Sent init"); + ods("Sent init %i %i", width, height); releaseMem(ctx); ctx->uiWidth = width; @@ -470,7 +470,6 @@ static void drawContext(Context * ctx, int width, int height) { glPushMatrix(); glLoadIdentity(); - glDisable(GL_ALPHA_TEST); glDisable(GL_AUTO_NORMAL); // Skip clip planes, there are thousands of them. @@ -493,10 +492,20 @@ static void drawContext(Context * ctx, int width, int height) { glDisable(GL_SEPARABLE_2D); glDisable(GL_SCISSOR_TEST); glDisable(GL_STENCIL_TEST); - glDisable(GL_TEXTURE_GEN_Q); - glDisable(GL_TEXTURE_GEN_R); - glDisable(GL_TEXTURE_GEN_S); - glDisable(GL_TEXTURE_GEN_T); + + GLboolean b = 0; + glGetBooleanv(GL_TEXTURE_GEN_Q, &b); + if (b) + glDisable(GL_TEXTURE_GEN_Q); + glGetBooleanv(GL_TEXTURE_GEN_R, &b); + if (b) + glDisable(GL_TEXTURE_GEN_R); + glGetBooleanv(GL_TEXTURE_GEN_S, &b); + if (b) + glDisable(GL_TEXTURE_GEN_S); + glGetBooleanv(GL_TEXTURE_GEN_T, &b); + if (b) + glDisable(GL_TEXTURE_GEN_T); glRenderMode(GL_RENDER); |