Moved local Extensions objects to GL2Extensions

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14582 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2014-12-09 10:37:09 +00:00
parent cceee38727
commit ec4f898bce
9 changed files with 57 additions and 183 deletions

View File

@@ -20,7 +20,6 @@
#include <osg/Vec4>
namespace osg {
/** Encapsulates OpenGL blend/transparency state. */
@@ -66,53 +65,6 @@ class OSG_EXPORT BlendColor : public StateAttribute
virtual void apply(State& state) const;
/** Encapsulates queries of extension availability, obtains extension
* function pointers, and provides convenience wrappers for
* calling extension functions. */
class OSG_EXPORT Extensions : public osg::Referenced
{
public:
Extensions(unsigned int contextID);
Extensions(const Extensions& rhs);
void lowestCommonDenominator(const Extensions& rhs);
void setupGLExtensions(unsigned int contextID);
void setBlendColorSupported(bool flag) { _isBlendColorSupported=flag; }
bool isBlendColorSupported() const { return _isBlendColorSupported; }
void glBlendColor(GLclampf red , GLclampf green , GLclampf blue , GLclampf alpha) const;
protected:
~Extensions() {}
typedef void (GL_APIENTRY * GLBlendColorProc) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
bool _isBlendColorSupported;
GLBlendColorProc _glBlendColor;
};
/** Returns the Extensions object for the given context.
* If createIfNotInitalized is true and the Extensions object doesn't
* exist, getExtensions() creates it on the given context.
* Returns NULL if createIfNotInitalized is false and the Extensions
* object doesn't exist. */
static Extensions* getExtensions(unsigned int contextID,bool createIfNotInitalized);
/** setExtensions() allows users to override the extensions across graphics contexts.
* Typically used when you have different extensions supported across graphics pipes,
* but need to ensure that they all use the same low common denominator extensions. */
static void setExtensions(unsigned int contextID,Extensions* extensions);
protected :
virtual ~BlendColor();