From 17a599ced356965549ece6a09ab4288c6fce0733 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Tue, 15 Jan 2013 00:52:00 +0000 Subject: [PATCH] - see if this fixes color picking --- source/shared_lib/sources/graphics/model.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/shared_lib/sources/graphics/model.cpp b/source/shared_lib/sources/graphics/model.cpp index 39f1e0edf..311e532b2 100644 --- a/source/shared_lib/sources/graphics/model.cpp +++ b/source/shared_lib/sources/graphics/model.cpp @@ -1528,13 +1528,15 @@ void BaseColorPickEntity::beginPicking() { //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //glClear(GL_COLOR_BUFFER_BIT); - glDisable(GL_TEXTURE_2D); + //glDisable(GL_TEXTURE_2D); //glDisable(GL_FOG); - glDisable(GL_LIGHTING); + //glDisable(GL_LIGHTING); - glDisable(GL_BLEND); + //glDisable(GL_BLEND); //glDisable(GL_MULTISAMPLE); //glDisable(GL_DITHER); + + glPushAttrib(GL_TEXTURE_2D | GL_LIGHTING | GL_BLEND | GL_MULTISAMPLE | GL_DITHER); } void BaseColorPickEntity::endPicking() { @@ -1546,6 +1548,7 @@ void BaseColorPickEntity::endPicking() { //glEnable(GL_BLEND); //glEnable(GL_MULTISAMPLE); //glEnable(GL_DITHER); + glPopAttrib(); } vector BaseColorPickEntity::getPickedList(int x,int y,int w,int h,