Moved osg::Drawable::Extensions into osg::GL2Extensions
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14575 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -495,246 +495,6 @@ class OSG_EXPORT Drawable : public Node
|
||||
* so one cannot modify it.*/
|
||||
virtual void accept(PrimitiveIndexFunctor&) const {}
|
||||
|
||||
|
||||
/** Extensions class which encapsulates the querying of extensions and
|
||||
* associated function pointers, and provide convenience wrappers to
|
||||
* check for the extensions or use the associated 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 setVertexProgramSupported(bool flag) { _isVertexProgramSupported=flag; }
|
||||
bool isVertexProgramSupported() const { return _isVertexProgramSupported; }
|
||||
|
||||
void setSecondaryColorSupported(bool flag) { _isSecondaryColorSupported=flag; }
|
||||
bool isSecondaryColorSupported() const { return _isSecondaryColorSupported; }
|
||||
|
||||
void setFogCoordSupported(bool flag) { _isFogCoordSupported=flag; }
|
||||
bool isFogCoordSupported() const { return _isFogCoordSupported; }
|
||||
|
||||
void setMultiTexSupported(bool flag) { _isMultiTexSupported=flag; }
|
||||
bool isMultiTexSupported() const { return _isMultiTexSupported; }
|
||||
|
||||
void setOcclusionQuerySupported(bool flag) { _isOcclusionQuerySupported=flag; }
|
||||
bool isOcclusionQuerySupported() const { return _isOcclusionQuerySupported; }
|
||||
|
||||
void setARBOcclusionQuerySupported(bool flag) { _isARBOcclusionQuerySupported=flag; }
|
||||
bool isARBOcclusionQuerySupported() const { return _isARBOcclusionQuerySupported; }
|
||||
|
||||
void setTimerQuerySupported(bool flag) { _isTimerQuerySupported = flag; }
|
||||
bool isTimerQuerySupported() const { return _isTimerQuerySupported; }
|
||||
void setARBTimerQuerySupported(bool flag) { _isARBTimerQuerySupported = flag; }
|
||||
bool isARBTimerQuerySupported() const { return _isARBTimerQuerySupported; }
|
||||
void glSecondaryColor3ubv(const GLubyte* coord) const;
|
||||
void glSecondaryColor3fv(const GLfloat* coord) const;
|
||||
|
||||
void glFogCoordfv(const GLfloat* coord) const;
|
||||
|
||||
void glMultiTexCoord1f(GLenum target,GLfloat coord) const;
|
||||
void glMultiTexCoord2fv(GLenum target,const GLfloat* coord) const;
|
||||
void glMultiTexCoord3fv(GLenum target,const GLfloat* coord) const;
|
||||
void glMultiTexCoord4fv(GLenum target,const GLfloat* coord) const;
|
||||
|
||||
void glMultiTexCoord1d(GLenum target,GLdouble coord) const;
|
||||
void glMultiTexCoord2dv(GLenum target,const GLdouble* coord) const;
|
||||
void glMultiTexCoord3dv(GLenum target,const GLdouble* coord) const;
|
||||
void glMultiTexCoord4dv(GLenum target,const GLdouble* coord) const;
|
||||
|
||||
void glVertexAttrib1s(unsigned int index, GLshort s) const;
|
||||
void glVertexAttrib1f(unsigned int index, GLfloat f) const;
|
||||
void glVertexAttrib1d(unsigned int index, GLdouble f) const;
|
||||
void glVertexAttrib2fv(unsigned int index, const GLfloat * v) const;
|
||||
void glVertexAttrib3fv(unsigned int index, const GLfloat * v) const;
|
||||
void glVertexAttrib4fv(unsigned int index, const GLfloat * v) const;
|
||||
void glVertexAttrib2dv(unsigned int index, const GLdouble * v) const;
|
||||
void glVertexAttrib3dv(unsigned int index, const GLdouble * v) const;
|
||||
void glVertexAttrib4dv(unsigned int index, const GLdouble * v) const;
|
||||
void glVertexAttrib4ubv(unsigned int index, const GLubyte * v) const;
|
||||
void glVertexAttrib4Nubv(unsigned int index, const GLubyte * v) const;
|
||||
|
||||
|
||||
void glGenBuffers (GLsizei n, GLuint *buffers) const;
|
||||
void glBindBuffer (GLenum target, GLuint buffer) const;
|
||||
void glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) const;
|
||||
void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data) const;
|
||||
void glDeleteBuffers (GLsizei n, const GLuint *buffers) const;
|
||||
GLboolean glIsBuffer (GLuint buffer) const;
|
||||
void glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data) const;
|
||||
GLvoid* glMapBuffer (GLenum target, GLenum access) const;
|
||||
GLboolean glUnmapBuffer (GLenum target) const;
|
||||
void glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params) const;
|
||||
void glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params) const;
|
||||
|
||||
|
||||
void glGenOcclusionQueries( GLsizei n, GLuint *ids ) const;
|
||||
void glDeleteOcclusionQueries( GLsizei n, const GLuint *ids ) const;
|
||||
GLboolean glIsOcclusionQuery( GLuint id ) const;
|
||||
void glBeginOcclusionQuery( GLuint id ) const;
|
||||
void glEndOcclusionQuery() const;
|
||||
void glGetOcclusionQueryiv( GLuint id, GLenum pname, GLint *params ) const;
|
||||
void glGetOcclusionQueryuiv( GLuint id, GLenum pname, GLuint *params ) const;
|
||||
|
||||
void glGetQueryiv(GLenum target, GLenum pname, GLint *params) const;
|
||||
void glGenQueries(GLsizei n, GLuint *ids) const;
|
||||
void glBeginQuery(GLenum target, GLuint id) const;
|
||||
void glEndQuery(GLenum target) const;
|
||||
void glQueryCounter(GLuint id, GLenum target) const;
|
||||
GLboolean glIsQuery(GLuint id) const;
|
||||
void glDeleteQueries(GLsizei n, const GLuint *ids) const;
|
||||
void glGetQueryObjectiv(GLuint id, GLenum pname, GLint *params) const;
|
||||
void glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params) const;
|
||||
void glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params) const;
|
||||
void glGetInteger64v(GLenum pname, GLint64 *params) const;
|
||||
|
||||
protected:
|
||||
|
||||
friend class ArrayDispatchers;
|
||||
|
||||
typedef void (GL_APIENTRY * FogCoordProc) (const GLfloat* coord);
|
||||
|
||||
typedef void (GL_APIENTRY * VertexAttrib1sProc) (GLuint index, GLshort s);
|
||||
typedef void (GL_APIENTRY * VertexAttrib1fProc) (GLuint index, GLfloat f);
|
||||
typedef void (GL_APIENTRY * VertexAttrib1dProc) (GLuint index, GLdouble f);
|
||||
typedef void (GL_APIENTRY * VertexAttribfvProc) (GLuint index, const GLfloat * v);
|
||||
typedef void (GL_APIENTRY * VertexAttribdvProc) (GLuint index, const GLdouble * v);
|
||||
typedef void (GL_APIENTRY * VertexAttribubvProc) (GLuint index, const GLubyte * v);
|
||||
|
||||
typedef void (GL_APIENTRY * SecondaryColor3ubvProc) (const GLubyte* coord);
|
||||
typedef void (GL_APIENTRY * SecondaryColor3fvProc) (const GLfloat* coord);
|
||||
|
||||
typedef void (GL_APIENTRY * MultiTexCoord1fProc) (GLenum target,GLfloat coord);
|
||||
typedef void (GL_APIENTRY * MultiTexCoordfvProc) (GLenum target,const GLfloat* coord);
|
||||
typedef void (GL_APIENTRY * MultiTexCoord1dProc) (GLenum target,GLdouble coord);
|
||||
typedef void (GL_APIENTRY * MultiTexCoorddvProc) (GLenum target,const GLdouble* coord);
|
||||
|
||||
|
||||
typedef void (GL_APIENTRY * GenBuffersProc) (GLsizei n, GLuint *buffers);
|
||||
typedef void (GL_APIENTRY * BindBufferProc) (GLenum target, GLuint buffer);
|
||||
typedef void (GL_APIENTRY * BufferDataProc) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
|
||||
typedef void (GL_APIENTRY * BufferSubDataProc) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
|
||||
typedef void (GL_APIENTRY * DeleteBuffersProc) (GLsizei n, const GLuint *buffers);
|
||||
typedef GLboolean (GL_APIENTRY * IsBufferProc) (GLuint buffer);
|
||||
typedef void (GL_APIENTRY * GetBufferSubDataProc) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
|
||||
typedef GLvoid* (GL_APIENTRY * MapBufferProc) (GLenum target, GLenum access);
|
||||
typedef GLboolean (GL_APIENTRY * UnmapBufferProc) (GLenum target);
|
||||
typedef void (GL_APIENTRY * GetBufferParameterivProc) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRY * GetBufferPointervProc) (GLenum target, GLenum pname, GLvoid* *params);
|
||||
|
||||
typedef void (GL_APIENTRY * GenOcclusionQueriesProc) ( GLsizei n, GLuint *ids );
|
||||
typedef void (GL_APIENTRY * DeleteOcclusionQueriesProc) ( GLsizei n, const GLuint *ids );
|
||||
typedef GLboolean (GL_APIENTRY * IsOcclusionQueryProc) ( GLuint id );
|
||||
typedef void (GL_APIENTRY * BeginOcclusionQueryProc) ( GLuint id );
|
||||
typedef void (GL_APIENTRY * EndOcclusionQueryProc) ();
|
||||
typedef void (GL_APIENTRY * GetOcclusionQueryivProc) ( GLuint id, GLenum pname, GLint *params );
|
||||
typedef void (GL_APIENTRY * GetOcclusionQueryuivProc) ( GLuint id, GLenum pname, GLuint *params );
|
||||
typedef void (GL_APIENTRY * GetOcclusionQueryui64vProc) ( GLuint id, GLenum pname, GLuint64 *params );
|
||||
|
||||
typedef void (GL_APIENTRY *GenQueriesProc) (GLsizei n, GLuint *ids);
|
||||
typedef void (GL_APIENTRY *DeleteQueriesProc) (GLsizei n, const GLuint *ids);
|
||||
typedef GLboolean (GL_APIENTRY *IsQueryProc) (GLuint id);
|
||||
typedef void (GL_APIENTRY *BeginQueryProc) (GLenum target, GLuint id);
|
||||
typedef void (GL_APIENTRY *EndQueryProc) (GLenum target);
|
||||
typedef void (GL_APIENTRY *QueryCounterProc)(GLuint id, GLenum target);
|
||||
typedef void (GL_APIENTRY *GetQueryivProc) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRY *GetQueryObjectivProc) (GLuint id, GLenum pname, GLint *params);
|
||||
typedef void (GL_APIENTRY *GetQueryObjectuivProc) (GLuint id, GLenum pname, GLuint *params);
|
||||
typedef void (GL_APIENTRY *GetQueryObjectui64vProc) (GLuint id, GLenum pname, GLuint64 *params);
|
||||
typedef void (GL_APIENTRY *GetInteger64vProc) (GLenum pname, GLint64 *params);
|
||||
|
||||
~Extensions() {}
|
||||
|
||||
bool _isVertexProgramSupported;
|
||||
bool _isSecondaryColorSupported;
|
||||
bool _isFogCoordSupported;
|
||||
bool _isMultiTexSupported;
|
||||
bool _isOcclusionQuerySupported;
|
||||
bool _isARBOcclusionQuerySupported;
|
||||
bool _isTimerQuerySupported;
|
||||
bool _isARBTimerQuerySupported;
|
||||
|
||||
FogCoordProc _glFogCoordfv;
|
||||
|
||||
SecondaryColor3ubvProc _glSecondaryColor3ubv;
|
||||
SecondaryColor3fvProc _glSecondaryColor3fv;
|
||||
|
||||
VertexAttrib1sProc _glVertexAttrib1s;
|
||||
VertexAttrib1fProc _glVertexAttrib1f;
|
||||
VertexAttrib1dProc _glVertexAttrib1d;
|
||||
VertexAttribfvProc _glVertexAttrib1fv;
|
||||
VertexAttribfvProc _glVertexAttrib2fv;
|
||||
VertexAttribfvProc _glVertexAttrib3fv;
|
||||
VertexAttribfvProc _glVertexAttrib4fv;
|
||||
VertexAttribdvProc _glVertexAttrib2dv;
|
||||
VertexAttribdvProc _glVertexAttrib3dv;
|
||||
VertexAttribdvProc _glVertexAttrib4dv;
|
||||
VertexAttribubvProc _glVertexAttrib4ubv;
|
||||
VertexAttribubvProc _glVertexAttrib4Nubv;
|
||||
|
||||
MultiTexCoord1fProc _glMultiTexCoord1f;
|
||||
MultiTexCoordfvProc _glMultiTexCoord1fv;
|
||||
MultiTexCoordfvProc _glMultiTexCoord2fv;
|
||||
MultiTexCoordfvProc _glMultiTexCoord3fv;
|
||||
MultiTexCoordfvProc _glMultiTexCoord4fv;
|
||||
MultiTexCoord1dProc _glMultiTexCoord1d;
|
||||
MultiTexCoorddvProc _glMultiTexCoord2dv;
|
||||
MultiTexCoorddvProc _glMultiTexCoord3dv;
|
||||
MultiTexCoorddvProc _glMultiTexCoord4dv;
|
||||
|
||||
GenBuffersProc _glGenBuffers;
|
||||
BindBufferProc _glBindBuffer;
|
||||
BufferDataProc _glBufferData;
|
||||
BufferSubDataProc _glBufferSubData;
|
||||
DeleteBuffersProc _glDeleteBuffers;
|
||||
IsBufferProc _glIsBuffer;
|
||||
GetBufferSubDataProc _glGetBufferSubData;
|
||||
MapBufferProc _glMapBuffer;
|
||||
UnmapBufferProc _glUnmapBuffer;
|
||||
GetBufferParameterivProc _glGetBufferParameteriv;
|
||||
GetBufferPointervProc _glGetBufferPointerv;
|
||||
|
||||
GenOcclusionQueriesProc _glGenOcclusionQueries;
|
||||
DeleteOcclusionQueriesProc _glDeleteOcclusionQueries;
|
||||
IsOcclusionQueryProc _glIsOcclusionQuery;
|
||||
BeginOcclusionQueryProc _glBeginOcclusionQuery;
|
||||
EndOcclusionQueryProc _glEndOcclusionQuery;
|
||||
GetOcclusionQueryivProc _glGetOcclusionQueryiv;
|
||||
GetOcclusionQueryuivProc _glGetOcclusionQueryuiv;
|
||||
|
||||
GenQueriesProc _gl_gen_queries_arb;
|
||||
DeleteQueriesProc _gl_delete_queries_arb;
|
||||
IsQueryProc _gl_is_query_arb;
|
||||
BeginQueryProc _gl_begin_query_arb;
|
||||
EndQueryProc _gl_end_query_arb;
|
||||
QueryCounterProc _glQueryCounter;
|
||||
GetQueryivProc _gl_get_queryiv_arb;
|
||||
GetQueryObjectivProc _gl_get_query_objectiv_arb;
|
||||
GetQueryObjectuivProc _gl_get_query_objectuiv_arb;
|
||||
GetQueryObjectui64vProc _gl_get_query_objectui64v;
|
||||
GetInteger64vProc _glGetInteger64v;
|
||||
|
||||
};
|
||||
|
||||
/** Function to call to get the extension of a specified context.
|
||||
* If the Extension object for that context has not yet been created
|
||||
* and the 'createIfNotInitalized' flag been set to false then returns NULL.
|
||||
* If 'createIfNotInitalized' is true then the Extensions object is
|
||||
* automatically created. However, in this case the extension object is
|
||||
* only created with the graphics context associated with ContextID..*/
|
||||
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:
|
||||
|
||||
Drawable& operator = (const Drawable&) { return *this;}
|
||||
|
||||
@@ -595,6 +595,7 @@ class OSG_EXPORT GL2Extensions : public osg::Referenced
|
||||
bool isGetProgramBinarySupported;
|
||||
bool isGpuShaderFp64Supported;
|
||||
bool isShaderAtomicCountersSupported;
|
||||
bool isRectangleSupported;
|
||||
|
||||
void (GL_APIENTRY * glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha);
|
||||
void (GL_APIENTRY * glDrawBuffers)(GLsizei n, const GLenum *bufs);
|
||||
@@ -777,9 +778,80 @@ class OSG_EXPORT GL2Extensions : public osg::Referenced
|
||||
void (GL_APIENTRY * glBlendFuncSeparatei) (GLuint buf, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) ;
|
||||
|
||||
|
||||
// Vertex Array extensions
|
||||
bool isVertexProgramSupported;
|
||||
bool isSecondaryColorSupported;
|
||||
bool isFogCoordSupported;
|
||||
bool isMultiTexSupported;
|
||||
bool isOcclusionQuerySupported;
|
||||
bool isARBOcclusionQuerySupported;
|
||||
bool isTimerQuerySupported;
|
||||
bool isARBTimerQuerySupported;
|
||||
|
||||
void (GL_APIENTRY * glSecondaryColor3ubv) (const GLubyte* coord);
|
||||
void (GL_APIENTRY * glSecondaryColor3fv) (const GLfloat* coord);
|
||||
|
||||
void (GL_APIENTRY * glFogCoordfv) (const GLfloat* coord);
|
||||
|
||||
void (GL_APIENTRY * glMultiTexCoord1f) (GLenum target,GLfloat coord);
|
||||
void (GL_APIENTRY * glMultiTexCoord1fv) (GLenum target,const GLfloat* coord);
|
||||
void (GL_APIENTRY * glMultiTexCoord2fv) (GLenum target,const GLfloat* coord);
|
||||
void (GL_APIENTRY * glMultiTexCoord3fv) (GLenum target,const GLfloat* coord);
|
||||
void (GL_APIENTRY * glMultiTexCoord4fv) (GLenum target,const GLfloat* coord);
|
||||
|
||||
void (GL_APIENTRY * glMultiTexCoord1d) (GLenum target,GLdouble coord);
|
||||
void (GL_APIENTRY * glMultiTexCoord1dv) (GLenum target,const GLdouble* coord);
|
||||
void (GL_APIENTRY * glMultiTexCoord2dv) (GLenum target,const GLdouble* coord);
|
||||
void (GL_APIENTRY * glMultiTexCoord3dv) (GLenum target,const GLdouble* coord);
|
||||
void (GL_APIENTRY * glMultiTexCoord4dv) (GLenum target,const GLdouble* coord);
|
||||
#if 0
|
||||
void (GL_APIENTRY * glVertexAttrib1s) (unsigned int index, GLshort s);
|
||||
void (GL_APIENTRY * glVertexAttrib1f) (unsigned int index, GLfloat f);
|
||||
void (GL_APIENTRY * glVertexAttrib1d) (unsigned int index, GLdouble f);
|
||||
void (GL_APIENTRY * glVertexAttrib2fv) (unsigned int index, const GLfloat * v);
|
||||
void (GL_APIENTRY * glVertexAttrib3fv) (unsigned int index, const GLfloat * v);
|
||||
void (GL_APIENTRY * glVertexAttrib4fv) (unsigned int index, const GLfloat * v);
|
||||
void (GL_APIENTRY * glVertexAttrib2dv) (unsigned int index, const GLdouble * v);
|
||||
void (GL_APIENTRY * glVertexAttrib3dv) (unsigned int index, const GLdouble * v);
|
||||
void (GL_APIENTRY * glVertexAttrib4dv) (unsigned int index, const GLdouble * v);
|
||||
void (GL_APIENTRY * glVertexAttrib4ubv) (unsigned int index, const GLubyte * v);
|
||||
void (GL_APIENTRY * glVertexAttrib4Nubv) (unsigned int index, const GLubyte * v);
|
||||
|
||||
void (GL_APIENTRY * glGenBuffers) (GLsizei n, GLuint *buffers);
|
||||
void (GL_APIENTRY * glBindBuffer (GLenum target, GLuint buffer);
|
||||
void (GL_APIENTRY * glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
|
||||
void (GL_APIENTRY * glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
|
||||
void (GL_APIENTRY * glDeleteBuffers (GLsizei n, const GLuint *buffers);
|
||||
GLboolean (GL_APIENTRY * glIsBuffer (GLuint buffer);
|
||||
void (GL_APIENTRY * glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
|
||||
GLvoid* (GL_APIENTRY * glMapBuffer (GLenum target, GLenum access);
|
||||
GLboolean (GL_APIENTRY * glUnmapBuffer (GLenum target);
|
||||
void (GL_APIENTRY * glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
|
||||
void (GL_APIENTRY * glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params);
|
||||
#endif
|
||||
|
||||
|
||||
void (GL_APIENTRY * glGenOcclusionQueries) ( GLsizei n, GLuint *ids );
|
||||
void (GL_APIENTRY * glDeleteOcclusionQueries) ( GLsizei n, const GLuint *ids );
|
||||
GLboolean (GL_APIENTRY * glIsOcclusionQuery) ( GLuint id );
|
||||
void (GL_APIENTRY * glBeginOcclusionQuery) ( GLuint id );
|
||||
void (GL_APIENTRY * glEndOcclusionQuery) ();
|
||||
void (GL_APIENTRY * glGetOcclusionQueryiv) ( GLuint id, GLenum pname, GLint *params );
|
||||
void (GL_APIENTRY * glGetOcclusionQueryuiv) ( GLuint id, GLenum pname, GLuint *params );
|
||||
|
||||
void (GL_APIENTRY * glGetQueryiv) (GLenum target, GLenum pname, GLint *params);
|
||||
void (GL_APIENTRY * glGenQueries) (GLsizei n, GLuint *ids);
|
||||
void (GL_APIENTRY * glBeginQuery) (GLenum target, GLuint id);
|
||||
void (GL_APIENTRY * glEndQuery) (GLenum target);
|
||||
void (GL_APIENTRY * glQueryCounter) (GLuint id, GLenum target);
|
||||
GLboolean (GL_APIENTRY * glIsQuery) (GLuint id);
|
||||
void (GL_APIENTRY * glDeleteQueries) (GLsizei n, const GLuint *ids);
|
||||
void (GL_APIENTRY * glGetQueryObjectiv) (GLuint id, GLenum pname, GLint *params);
|
||||
void (GL_APIENTRY * glGetQueryObjectuiv) (GLuint id, GLenum pname, GLuint *params);
|
||||
void (GL_APIENTRY * glGetQueryObjectui64v) (GLuint id, GLenum pname, GLuint64 *params);
|
||||
void (GL_APIENTRY * glGetInteger64v) (GLenum pname, GLint64 *params);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -173,7 +173,7 @@ class OSG_EXPORT State : public Referenced
|
||||
* Note, safe to call outwith a the graphics context thread associated with this osg::State.
|
||||
* Returns NULL if the desired extension object has not been created yet.*/
|
||||
template<typename T>
|
||||
const T* getExisting() const
|
||||
const T* get() const
|
||||
{
|
||||
const std::type_info* id(&typeid(T));
|
||||
ExtensionMap::const_iterator itr = _extensionMap.find(id);
|
||||
@@ -2778,7 +2778,7 @@ inline bool State::setActiveTextureUnit( unsigned int unit )
|
||||
|
||||
// forward declare speciailization of State::get() method
|
||||
template<> inline GL2Extensions* State::get<GL2Extensions>() { return _gl2Extentsions.get(); }
|
||||
template<> inline const GL2Extensions* State::getExisting<GL2Extensions>() const { return _gl2Extentsions.get(); }
|
||||
template<> inline const GL2Extensions* State::get<GL2Extensions>() const { return _gl2Extentsions.get(); }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class OSGVIEWER_EXPORT OpenGLQuerySupport : public osg::Referenced
|
||||
virtual void initialize(osg::State* state, osg::Timer_t startTick);
|
||||
protected:
|
||||
|
||||
const osg::Drawable::Extensions* _extensions;
|
||||
const osg::GL2Extensions* _extensions;
|
||||
};
|
||||
|
||||
class OSGVIEWER_EXPORT Renderer : public osg::GraphicsOperation
|
||||
|
||||
Reference in New Issue
Block a user