From ca75d20215e766f3b2f6c4ba93c9aff0896dc7df Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Wed, 21 Dec 2011 12:20:55 +1000 Subject: [PATCH] Mac GL transitions fix #1 --- Graphs/gGraphView.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Graphs/gGraphView.cpp b/Graphs/gGraphView.cpp index 0c21320b..d79edf13 100644 --- a/Graphs/gGraphView.cpp +++ b/Graphs/gGraphView.cpp @@ -2532,11 +2532,15 @@ void gGraphView::paintGL() offset=0; offset2=0; glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glDisable(GL_ALPHA_TEST); + //glAlphaFunc(GL_GREATER,0.0); glColor4f(1.0,1.0,1.0,aphase); // glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); bindTexture(previous_day_snapshot); + //glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glBegin(GL_QUADS); glTexCoord2f(0.0f, 1.0f); glVertex2f(0,0); glTexCoord2f(1.0f, 1.0f); glVertex2f(width(),0); @@ -2547,8 +2551,6 @@ void gGraphView::paintGL() glColor4f(1.0,1.0,1.0,phase); // glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - //glAlphaFunc(GL_GREATER,0.9); - //glEnable(GL_ALPHA_TEST); bindTexture(current_day_snapshot); glBegin(GL_QUADS); glTexCoord2f(0.0f, 1.0f); glVertex2f(0,0); @@ -2557,7 +2559,7 @@ void gGraphView::paintGL() glTexCoord2f(0.0f, 0.0f); glVertex2f(0,height()); glEnd(); - //glDisable(GL_ALPHA_TEST); + glDisable(GL_ALPHA_TEST); glDisable(GL_BLEND); glBindTexture(GL_TEXTURE_2D,0); }