Commit 7f456d95 authored by Martin Schultz's avatar Martin Schultz

fixed more deprecated glCalls

parent 400efbac
......@@ -526,8 +526,11 @@ void LightNode::enter(GLState& _state, const DrawModes::DrawMode& /* _drawmode *
/// transfer GL-preferences to lightSave_
getParameters(_state, lightId_, lightSave_);
// save old light
lightSave_.enabled_ = glIsEnabled(lightId_);
if(_state.compatibilityProfile())
{
// save old light
lightSave_.enabled_ = glIsEnabled(lightId_);
}
if(light_.enabled_ ) {
// correct Position for fixed Lights
......
......@@ -346,7 +346,7 @@ class OBJECTTYPEDLLEXPORT LightSourceHandle {
GLint maxLights;
// Get max number of lights
if (OpenFlipper::Options::gui())
if (OpenFlipper::Options::gui() && !OpenFlipper::Options::coreProfile())
glGetIntegerv(GL_MAX_LIGHTS, &maxLights);
else
maxLights = 50;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment