From 3531bec43cd28ae61499fb83c0d1209519e24977 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 7 Jan 2014 11:01:32 +0000 Subject: [PATCH] Added State::getMaxTextureCoords() and State::getMaxTextureUnits() inline methods. --- include/osg/State | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/osg/State b/include/osg/State index 1df058436..0a6ba9baa 100644 --- a/include/osg/State +++ b/include/osg/State @@ -1206,6 +1206,13 @@ class OSG_EXPORT State : public Referenced, public Observer } + /// For GL>=2.0 uses GL_MAX_TEXTURE_COORDS, for GL<2 uses GL_MAX_TEXTURE_UNITS + inline GLint getMaxTextureCoords() const { return _glMaxTextureCoords; } + + /// For GL>=2.0 uses GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, for GL<2 uses GL_MAX_TEXTURE_UNITS + inline GLint getMaxTextureUnits() const { return _glMaxTextureUnits; } + + /** Set the current texture unit, return true if selected, * false if selection failed such as when multi texturing is not supported. * note, only updates values that change.*/