Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-10-07 12:36:08 +0000
committerStijn Buys <ingar@osirion.org>2012-10-07 12:36:08 +0000
commit25a7afeeff7fabaf721cba732a1a3fb47b0b26cd (patch)
tree45c65fb41daf7b7ab878a46ef9e96fd6c81acbfa /src/render/state.cc
parente14c5a54a8821affb100c5aee131fabe2955f684 (diff)
Probe the maximal number of OpenGL lights.
Diffstat (limited to 'src/render/state.cc')
-rw-r--r--src/render/state.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/render/state.cc b/src/render/state.cc
index 06156a1..5f026f0 100644
--- a/src/render/state.cc
+++ b/src/render/state.cc
@@ -22,6 +22,7 @@ float State::state_aspect = 0;
bool State::state_has_generate_mipmaps = false;
bool State::state_has_vbo = false;
GLuint State::state_vbo = 0;
+int State::state_maxlights;
math::Color State::state_color_primary;
@@ -95,6 +96,10 @@ void State::init(int width, int height)
else
con_print << "disabled" << std::endl;
+ // probe maximal number of lights
+ glGetIntegerv(GL_MAX_LIGHTS, &state_maxlights);
+ con_debug << " maximum number of OpenGL lights is " << state_maxlights << std::endl;
+
// Generate VBO
if (state_has_vbo)
gl::genbuffers(1, &state_vbo);