Commit 0e14a30a authored by Mike Kremer's avatar Mike Kremer
Browse files

Added max_texture_units() function.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8257 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 8031cc82
......@@ -122,6 +122,12 @@ void GLState::initialize()
// multisampling
set_multisampling(true);
// Get max number of texture units
GLint value;
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &value);
num_texture_units_ = value;
// lighting
set_twosided_lighting(true);
}
......
......@@ -422,7 +422,10 @@ public:
void allow_multisampling( bool _b ) { allow_multisampling_ = _b; };
/// Check if Multisampling is globally disabled
bool multisampling_alloowed(){ return allow_multisampling_; };
bool multisampling_allowed(){ return allow_multisampling_; };
/// Get max number of available texture units
int max_texture_units() const { return num_texture_units_; }
//--- picking ---------------------------------------------------------------
......@@ -525,7 +528,9 @@ private: //--------------------------------------------------------------------
// Multisampling settings
bool multisampling_;
bool allow_multisampling_;
int num_texture_units_;
// helper: should GL matrices be updated
bool updateGL_;
......
Supports Markdown
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