Intoduced a new setGLExtensions template method to do a copy of void* pointer to
local function pointer to avoid compiler warnings related to case void*. Moved various OSG classes across to using setGLExtensions instead of getGLExtensions, and changed them to use typedef declarations in the headers rather than casts in the .cpp. Updated wrappers
This commit is contained in:
@@ -363,6 +363,78 @@ configure reflector "osg::Drawable::Extensions"
|
||||
end
|
||||
end
|
||||
|
||||
configure reflector "osg::BlendColor::Extensions"
|
||||
configure method "__typedef__void__APIENTRY_P1"
|
||||
replace with ""
|
||||
end
|
||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
||||
replace with ""
|
||||
end
|
||||
end
|
||||
|
||||
configure reflector "osg::BlendEquation::Extensions"
|
||||
configure method "__typedef__void__APIENTRY_P1"
|
||||
replace with ""
|
||||
end
|
||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
||||
replace with ""
|
||||
end
|
||||
end
|
||||
|
||||
configure reflector "osg::BlendFunc::Extensions"
|
||||
configure method "__typedef__void__APIENTRY_P1"
|
||||
replace with ""
|
||||
end
|
||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
||||
replace with ""
|
||||
end
|
||||
end
|
||||
|
||||
configure reflector "osg::FragmentProgram::Extensions"
|
||||
configure method "__typedef__void__APIENTRY_P1"
|
||||
replace with ""
|
||||
end
|
||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
||||
replace with ""
|
||||
end
|
||||
end
|
||||
|
||||
configure reflector "osg::Multisample::Extensions"
|
||||
configure method "__typedef__void__APIENTRY_P1"
|
||||
replace with ""
|
||||
end
|
||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
||||
replace with ""
|
||||
end
|
||||
end
|
||||
|
||||
configure reflector "osg::Point::Extensions"
|
||||
configure method "__typedef__void__APIENTRY_P1"
|
||||
replace with ""
|
||||
end
|
||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
||||
replace with ""
|
||||
end
|
||||
end
|
||||
|
||||
configure reflector "osg::ClampColor::Extensions"
|
||||
configure method "__typedef__void__APIENTRY_P1"
|
||||
replace with ""
|
||||
end
|
||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
||||
replace with ""
|
||||
end
|
||||
end
|
||||
|
||||
configure reflector "osg::Texture::Extensions"
|
||||
configure method "__typedef__void__APIENTRY_P1"
|
||||
replace with ""
|
||||
end
|
||||
configure method "__typedef__GLboolean__APIENTRY_P1"
|
||||
replace with ""
|
||||
end
|
||||
end
|
||||
|
||||
configure reflector "osg::State"
|
||||
configure method "__typedef__void__APIENTRY_P1"
|
||||
replace with ""
|
||||
|
||||
@@ -86,16 +86,16 @@ class OSG_EXPORT BlendColor : public StateAttribute
|
||||
void setBlendColorSupported(bool flag) { _isBlendColorSupported=flag; }
|
||||
bool isBlendColorSupported() const { return _isBlendColorSupported; }
|
||||
|
||||
void setBlendColorProc(void* ptr) { _glBlendColor = ptr; }
|
||||
void glBlendColor(GLclampf red , GLclampf green , GLclampf blue , GLclampf alpha) const;
|
||||
|
||||
protected:
|
||||
|
||||
~Extensions() {}
|
||||
|
||||
bool _isBlendColorSupported;
|
||||
|
||||
void* _glBlendColor;
|
||||
typedef void (APIENTRY * GLBlendColorProc) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
bool _isBlendColorSupported;
|
||||
GLBlendColorProc _glBlendColor;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -110,18 +110,19 @@ class OSG_EXPORT BlendEquation : public StateAttribute
|
||||
bool isSGIXMinMaxSupported() const { return _isSGIXMinMaxSupported; }
|
||||
bool isLogicOpSupported() const { return _isLogicOpSupported; }
|
||||
|
||||
void setBlendEquationProc(void* ptr) { _glBlendEquation = ptr; }
|
||||
void glBlendEquation(GLenum mode) const;
|
||||
|
||||
protected:
|
||||
|
||||
~Extensions() {}
|
||||
|
||||
bool _isBlendEquationSupported;
|
||||
bool _isSGIXMinMaxSupported;
|
||||
bool _isLogicOpSupported;
|
||||
typedef void (APIENTRY * GLBlendEquationProc) (GLenum mode);
|
||||
|
||||
void* _glBlendEquation;
|
||||
bool _isBlendEquationSupported;
|
||||
bool _isSGIXMinMaxSupported;
|
||||
bool _isLogicOpSupported;
|
||||
|
||||
GLBlendEquationProc _glBlendEquation;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -147,7 +147,6 @@ class OSG_EXPORT BlendFunc : public StateAttribute
|
||||
void setBlendFuncSeparateSupported(bool flag) { _isBlendFuncSeparateSupported=flag; }
|
||||
bool isBlendFuncSeparateSupported() const { return _isBlendFuncSeparateSupported; }
|
||||
|
||||
void setBlendFuncSeparateProc(void* ptr) { _glBlendFuncSeparate = ptr; }
|
||||
void glBlendFuncSeparate(GLenum sfactorRGB,
|
||||
GLenum dfactorRGB,
|
||||
GLenum sfactorAlpha,
|
||||
@@ -157,9 +156,13 @@ class OSG_EXPORT BlendFunc : public StateAttribute
|
||||
|
||||
~Extensions() {}
|
||||
|
||||
bool _isBlendFuncSeparateSupported;
|
||||
|
||||
void* _glBlendFuncSeparate;
|
||||
typedef void (APIENTRY * GLBlendFuncSeparateProc) (GLenum sfactorRGB,
|
||||
GLenum dfactorRGB,
|
||||
GLenum sfactorAlpha,
|
||||
GLenum dfactorAlpha);
|
||||
bool _isBlendFuncSeparateSupported;
|
||||
GLBlendFuncSeparateProc _glBlendFuncSeparate;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -94,16 +94,15 @@ class OSG_EXPORT ClampColor : public StateAttribute
|
||||
void setClampColorSupported(bool flag) { _isClampColorSupported=flag; }
|
||||
bool isClampColorSupported() const { return _isClampColorSupported; }
|
||||
|
||||
void setClampColorProc(void* ptr) { _glClampColor = ptr; }
|
||||
void glClampColor(GLenum target, GLenum mode) const;
|
||||
|
||||
protected:
|
||||
|
||||
~Extensions() {}
|
||||
|
||||
bool _isClampColorSupported;
|
||||
|
||||
void* _glClampColor;
|
||||
typedef void (APIENTRY * GLClampColorProc) (GLenum target, GLenum mode);
|
||||
bool _isClampColorSupported;
|
||||
GLClampColorProc _glClampColor;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -257,11 +257,17 @@ class OSG_EXPORT FragmentProgram : public StateAttribute
|
||||
|
||||
bool _isFragmentProgramSupported;
|
||||
|
||||
void* _glBindProgram;
|
||||
void* _glGenPrograms;
|
||||
void *_glDeletePrograms;
|
||||
void* _glProgramString;
|
||||
void* _glProgramLocalParameter4fv;
|
||||
typedef void (APIENTRY * BindProgramProc) (GLenum target, GLuint id);
|
||||
typedef void (APIENTRY * GenProgramsProc) (GLsizei n, GLuint *programs);
|
||||
typedef void (APIENTRY * DeleteProgramsProc) (GLsizei n, GLuint *programs);
|
||||
typedef void (APIENTRY * ProgramStringProc) (GLenum target, GLenum format, GLsizei len, const void *string);
|
||||
typedef void (APIENTRY * ProgramLocalParameter4fvProc) (GLenum target, GLuint index, const GLfloat *params);
|
||||
|
||||
BindProgramProc _glBindProgram;
|
||||
GenProgramsProc _glGenPrograms;
|
||||
DeleteProgramsProc _glDeletePrograms;
|
||||
ProgramStringProc _glProgramString;
|
||||
ProgramLocalParameter4fvProc _glProgramLocalParameter4fv;
|
||||
};
|
||||
|
||||
/** Function to call to get the extension of a specified context.
|
||||
|
||||
@@ -68,6 +68,40 @@ inline void* getGLExtensionFuncPtr(const char *funcName,const char *fallbackFunc
|
||||
return getGLExtensionFuncPtr(fallbackFuncName);
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
bool setGLExtensionFuncPtr(T& t, const char* str1)
|
||||
{
|
||||
void* data = osg::getGLExtensionFuncPtr(str1);
|
||||
if (data)
|
||||
{
|
||||
memcpy(&t, &data, sizeof(T));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
t = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool setGLExtensionFuncPtr(T& t, const char* str1, const char* str2)
|
||||
{
|
||||
void* data = osg::getGLExtensionFuncPtr(str1,str2);
|
||||
if (data)
|
||||
{
|
||||
memcpy(&t, &data, sizeof(T));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
t = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** Return true if OpenGL "extension" is supported.
|
||||
* Note: Must only be called within a valid OpenGL context,
|
||||
* undefined behavior may occur otherwise.
|
||||
|
||||
@@ -112,7 +112,6 @@ class OSG_EXPORT Multisample : public StateAttribute
|
||||
bool isMultisampleSupported() const { return _isMultisampleSupported; }
|
||||
bool isMultisampleFilterHintSupported() const { return _isMultisampleFilterHintSupported; }
|
||||
|
||||
void setSampleCoverageProc(void* ptr) { _glSampleCoverage = ptr; }
|
||||
void glSampleCoverage(GLclampf value, GLboolean invert) const;
|
||||
|
||||
protected:
|
||||
@@ -121,7 +120,9 @@ class OSG_EXPORT Multisample : public StateAttribute
|
||||
|
||||
bool _isMultisampleSupported;
|
||||
bool _isMultisampleFilterHintSupported;
|
||||
void* _glSampleCoverage;
|
||||
|
||||
typedef void (APIENTRY * GLSampleCoverageProc) (GLclampf value, GLboolean invert);
|
||||
GLSampleCoverageProc _glSampleCoverage;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -108,9 +108,13 @@ class OSG_EXPORT Point : public StateAttribute
|
||||
bool _isPointParametersSupported;
|
||||
bool _isPointSpriteCoordOriginSupported;
|
||||
|
||||
void* _glPointParameteri;
|
||||
void* _glPointParameterf;
|
||||
void* _glPointParameterfv;
|
||||
typedef void (APIENTRY * GLPointParameteriProc) (GLenum pname, GLint param);
|
||||
typedef void (APIENTRY * GLPointParameterfProc) (GLenum pname, GLfloat param);
|
||||
typedef void (APIENTRY * GLPointParameterfvProc) (GLenum pname, const GLfloat *params);
|
||||
|
||||
GLPointParameteriProc _glPointParameteri;
|
||||
GLPointParameterfProc _glPointParameterf;
|
||||
GLPointParameterfvProc _glPointParameterfv;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -522,16 +522,10 @@ class OSG_EXPORT Texture : public osg::StateAttribute
|
||||
GLint numTextureUnits() const { return _numTextureUnits; }
|
||||
|
||||
bool isCompressedTexImage2DSupported() const { return _glCompressedTexImage2D!=0; }
|
||||
|
||||
void setCompressedTexImage2DProc(void* ptr) { _glCompressedTexImage2D = ptr; }
|
||||
void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) const;
|
||||
|
||||
bool isCompressedTexSubImage2DSupported() const { return _glCompressedTexSubImage2D!=0; }
|
||||
|
||||
void setCompressedTexSubImage2DProc(void* ptr) { _glCompressedTexSubImage2D = ptr; }
|
||||
void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) const;
|
||||
void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei type, const GLvoid *data) const;
|
||||
|
||||
void setGetCompressedTexImageProc(void* ptr) { _glGetCompressedTexImage = ptr; }
|
||||
void glGetCompressedTexImage(GLenum target, GLint level, GLvoid *data) const;
|
||||
|
||||
bool isClientStorageSupported() const { return _isClientStorageSupported; }
|
||||
@@ -564,9 +558,13 @@ class OSG_EXPORT Texture : public osg::StateAttribute
|
||||
GLint _maxTextureSize;
|
||||
GLint _numTextureUnits;
|
||||
|
||||
void* _glCompressedTexImage2D;
|
||||
void* _glCompressedTexSubImage2D;
|
||||
void* _glGetCompressedTexImage;
|
||||
typedef void (APIENTRY * CompressedTexImage2DArbProc) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRY * CompressedTexSubImage2DArbProc) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRY * GetCompressedTexImageArbProc) (GLenum target, GLint level, GLvoid *data);
|
||||
|
||||
CompressedTexImage2DArbProc _glCompressedTexImage2D;
|
||||
CompressedTexSubImage2DArbProc _glCompressedTexSubImage2D;
|
||||
GetCompressedTexImageArbProc _glGetCompressedTexImage;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -92,15 +92,14 @@ void BlendColor::Extensions::setupGLExtensions(unsigned int contextID)
|
||||
_isBlendColorSupported = isGLExtensionSupported(contextID,"GL_EXT_blend_color") ||
|
||||
strncmp((const char*)glGetString(GL_VERSION),"1.2",3)>=0;
|
||||
|
||||
_glBlendColor = getGLExtensionFuncPtr("glBlendColor", "glBlendColorEXT");
|
||||
setGLExtensionFuncPtr(_glBlendColor, "glBlendColor", "glBlendColorEXT");
|
||||
}
|
||||
|
||||
void BlendColor::Extensions::glBlendColor(GLclampf red , GLclampf green , GLclampf blue , GLclampf alpha) const
|
||||
{
|
||||
if (_glBlendColor)
|
||||
{
|
||||
typedef void (APIENTRY * GLBlendColorProc) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
((GLBlendColorProc)_glBlendColor)(red, green, blue, alpha);
|
||||
_glBlendColor(red, green, blue, alpha);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -111,15 +111,14 @@ void BlendEquation::Extensions::setupGLExtensions(unsigned int contextID)
|
||||
_isSGIXMinMaxSupported = isGLExtensionSupported(contextID, "GL_SGIX_blend_alpha_minmax");
|
||||
_isLogicOpSupported = isGLExtensionSupported(contextID, "GL_EXT_blend_logic_op");
|
||||
|
||||
_glBlendEquation = getGLExtensionFuncPtr("glBlendEquation", "glBlendEquationEXT");
|
||||
setGLExtensionFuncPtr(_glBlendEquation, "glBlendEquation", "glBlendEquationEXT");
|
||||
}
|
||||
|
||||
void BlendEquation::Extensions::glBlendEquation(GLenum mode) const
|
||||
{
|
||||
if (_glBlendEquation)
|
||||
{
|
||||
typedef void (APIENTRY * GLBlendEquationProc) (GLenum mode);
|
||||
((GLBlendEquationProc)_glBlendEquation)(mode);
|
||||
_glBlendEquation(mode);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -109,7 +109,7 @@ void BlendFunc::Extensions::setupGLExtensions(unsigned int contextID)
|
||||
_isBlendFuncSeparateSupported = isGLExtensionSupported(contextID, "GL_EXT_blend_func_separate") ||
|
||||
strncmp((const char*)glGetString(GL_VERSION), "1.4", 3) >= 0;
|
||||
|
||||
_glBlendFuncSeparate = getGLExtensionFuncPtr("glBlendFuncSeparate", "glBlendFuncSeparateEXT");
|
||||
setGLExtensionFuncPtr(_glBlendFuncSeparate, "glBlendFuncSeparate", "glBlendFuncSeparateEXT");
|
||||
}
|
||||
|
||||
void BlendFunc::Extensions::glBlendFuncSeparate(GLenum sfactorRGB,
|
||||
@@ -119,14 +119,7 @@ void BlendFunc::Extensions::glBlendFuncSeparate(GLenum sfactorRGB,
|
||||
{
|
||||
if (_glBlendFuncSeparate)
|
||||
{
|
||||
typedef void (APIENTRY * GLBlendFuncSeparateProc) (GLenum sfactorRGB,
|
||||
GLenum dfactorRGB,
|
||||
GLenum sfactorAlpha,
|
||||
GLenum dfactorAlpha);
|
||||
((GLBlendFuncSeparateProc)_glBlendFuncSeparate)(sfactorRGB,
|
||||
dfactorRGB,
|
||||
sfactorAlpha,
|
||||
dfactorAlpha);
|
||||
_glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -191,17 +191,17 @@ void BufferObject::Extensions::lowestCommonDenominator(const Extensions& rhs)
|
||||
|
||||
void BufferObject::Extensions::setupGLExtensions(unsigned int contextID)
|
||||
{
|
||||
_glGenBuffers = ((GenBuffersProc)osg::getGLExtensionFuncPtr("glGenBuffers","glGenBuffersARB"));
|
||||
_glBindBuffer = ((BindBufferProc)osg::getGLExtensionFuncPtr("glBindBuffer","glBindBufferARB"));
|
||||
_glBufferData = ((BufferDataProc)osg::getGLExtensionFuncPtr("glBufferData","glBufferDataARB"));
|
||||
_glBufferSubData = ((BufferSubDataProc)osg::getGLExtensionFuncPtr("glBufferSubData","glBufferSubDataARB"));
|
||||
_glDeleteBuffers = ((DeleteBuffersProc)osg::getGLExtensionFuncPtr("glDeleteBuffers","glDeleteBuffersARB"));
|
||||
_glIsBuffer = ((IsBufferProc)osg::getGLExtensionFuncPtr("glIsBuffer","glIsBufferARB"));
|
||||
_glGetBufferSubData = ((GetBufferSubDataProc)osg::getGLExtensionFuncPtr("glGetBufferSubData","glGetBufferSubDataARB"));
|
||||
_glMapBuffer = ((MapBufferProc)osg::getGLExtensionFuncPtr("glMapBuffer","glMapBufferARB"));
|
||||
_glUnmapBuffer = ((UnmapBufferProc)osg::getGLExtensionFuncPtr("glUnmapBuffer","glUnmapBufferARB"));
|
||||
_glGetBufferParameteriv = ((GetBufferParameterivProc)osg::getGLExtensionFuncPtr("glGetBufferParameteriv","glGetBufferParameterivARB"));
|
||||
_glGetBufferPointerv = ((GetBufferPointervProc)osg::getGLExtensionFuncPtr("glGetBufferPointerv","glGetBufferPointervARB"));
|
||||
setGLExtensionFuncPtr(_glGenBuffers, "glGenBuffers","glGenBuffersARB");
|
||||
setGLExtensionFuncPtr(_glBindBuffer, "glBindBuffer","glBindBufferARB");
|
||||
setGLExtensionFuncPtr(_glBufferData, "glBufferData","glBufferDataARB");
|
||||
setGLExtensionFuncPtr(_glBufferSubData, "glBufferSubData","glBufferSubDataARB");
|
||||
setGLExtensionFuncPtr(_glDeleteBuffers, "glDeleteBuffers","glDeleteBuffersARB");
|
||||
setGLExtensionFuncPtr(_glIsBuffer, "glIsBuffer","glIsBufferARB");
|
||||
setGLExtensionFuncPtr(_glGetBufferSubData, "glGetBufferSubData","glGetBufferSubDataARB");
|
||||
setGLExtensionFuncPtr(_glMapBuffer, "glMapBuffer","glMapBufferARB");
|
||||
setGLExtensionFuncPtr(_glUnmapBuffer, "glUnmapBuffer","glUnmapBufferARB");
|
||||
setGLExtensionFuncPtr(_glGetBufferParameteriv, "glGetBufferParameteriv","glGetBufferParameterivARB");
|
||||
setGLExtensionFuncPtr(_glGetBufferPointerv, "glGetBufferPointerv","glGetBufferPointervARB");
|
||||
_isPBOSupported = osg::isGLExtensionSupported(contextID,"GL_ARB_pixel_buffer_object");
|
||||
}
|
||||
|
||||
|
||||
@@ -96,15 +96,14 @@ void ClampColor::Extensions::setupGLExtensions(unsigned int contextID)
|
||||
_isClampColorSupported = isGLExtensionSupported(contextID,"GL_ARB_color_buffer_float") ||
|
||||
strncmp((const char*)glGetString(GL_VERSION),"2.0",3)>=0;
|
||||
|
||||
_glClampColor = getGLExtensionFuncPtr("glClampColor", "glClampColorARB");
|
||||
setGLExtensionFuncPtr(_glClampColor, "glClampColor", "glClampColorARB");
|
||||
}
|
||||
|
||||
void ClampColor::Extensions::glClampColor(GLenum target, GLenum mode) const
|
||||
{
|
||||
if (_glClampColor)
|
||||
{
|
||||
typedef void (APIENTRY * GLClampColorProc) (GLenum target, GLenum mode);
|
||||
((GLClampColorProc)_glClampColor)(target,mode);
|
||||
_glClampColor(target,mode);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -961,51 +961,51 @@ void Drawable::Extensions::setupGLExtensions(unsigned int contextID)
|
||||
_isTimerQuerySupported = osg::isGLExtensionSupported(contextID, "GL_EXT_timer_query" );;
|
||||
|
||||
|
||||
_glFogCoordfv = ((FogCoordProc)osg::getGLExtensionFuncPtr("glFogCoordfv","glFogCoordfvEXT"));
|
||||
_glSecondaryColor3ubv = ((SecondaryColor3ubvProc)osg::getGLExtensionFuncPtr("glSecondaryColor3ubv","glSecondaryColor3ubvEXT"));
|
||||
_glSecondaryColor3fv = ((SecondaryColor3fvProc)osg::getGLExtensionFuncPtr("glSecondaryColor3fv","glSecondaryColor3fvEXT"));
|
||||
_glMultiTexCoord1f = ((MultiTexCoord1fProc)osg::getGLExtensionFuncPtr("glMultiTexCoord1f","glMultiTexCoord1fARB"));
|
||||
_glMultiTexCoord2fv = ((MultiTexCoordfvProc)osg::getGLExtensionFuncPtr("glMultiTexCoord2fv","glMultiTexCoord2fvARB"));
|
||||
_glMultiTexCoord3fv = ((MultiTexCoordfvProc)osg::getGLExtensionFuncPtr("glMultiTexCoord3fv","glMultiTexCoord3fvARB"));
|
||||
_glMultiTexCoord4fv = ((MultiTexCoordfvProc)osg::getGLExtensionFuncPtr("glMultiTexCoord4fv","glMultiTexCoord4fvARB"));
|
||||
setGLExtensionFuncPtr(_glFogCoordfv, "glFogCoordfv","glFogCoordfvEXT");
|
||||
setGLExtensionFuncPtr(_glSecondaryColor3ubv, "glSecondaryColor3ubv","glSecondaryColor3ubvEXT");
|
||||
setGLExtensionFuncPtr(_glSecondaryColor3fv, "glSecondaryColor3fv","glSecondaryColor3fvEXT");
|
||||
setGLExtensionFuncPtr(_glMultiTexCoord1f, "glMultiTexCoord1f","glMultiTexCoord1fARB");
|
||||
setGLExtensionFuncPtr(_glMultiTexCoord2fv, "glMultiTexCoord2fv","glMultiTexCoord2fvARB");
|
||||
setGLExtensionFuncPtr(_glMultiTexCoord3fv, "glMultiTexCoord3fv","glMultiTexCoord3fvARB");
|
||||
setGLExtensionFuncPtr(_glMultiTexCoord4fv, "glMultiTexCoord4fv","glMultiTexCoord4fvARB");
|
||||
|
||||
_glVertexAttrib1s = ((VertexAttrib1sProc)osg::getGLExtensionFuncPtr("glVertexAttrib1s","glVertexAttrib1sARB"));
|
||||
_glVertexAttrib1f = ((VertexAttrib1fProc)osg::getGLExtensionFuncPtr("glVertexAttrib1f","glVertexAttrib1fARB"));
|
||||
_glVertexAttrib2fv = ((VertexAttribfvProc)osg::getGLExtensionFuncPtr("glVertexAttrib2fv","glVertexAttrib2fvARB"));
|
||||
_glVertexAttrib3fv = ((VertexAttribfvProc)osg::getGLExtensionFuncPtr("glVertexAttrib3fv","glVertexAttrib3fvARB"));
|
||||
_glVertexAttrib4fv = ((VertexAttribfvProc)osg::getGLExtensionFuncPtr("glVertexAttrib4fv","glVertexAttrib4fvARB"));
|
||||
_glVertexAttrib4ubv = ((VertexAttribubvProc)osg::getGLExtensionFuncPtr("glVertexAttrib4ubv","glVertexAttrib4ubvARB"));
|
||||
_glVertexAttrib4Nubv = ((VertexAttribubvProc)osg::getGLExtensionFuncPtr("glVertexAttrib4Nubv","glVertexAttrib4NubvARB"));
|
||||
setGLExtensionFuncPtr(_glVertexAttrib1s, "glVertexAttrib1s","glVertexAttrib1sARB");
|
||||
setGLExtensionFuncPtr(_glVertexAttrib1f, "glVertexAttrib1f","glVertexAttrib1fARB");
|
||||
setGLExtensionFuncPtr(_glVertexAttrib2fv, "glVertexAttrib2fv","glVertexAttrib2fvARB");
|
||||
setGLExtensionFuncPtr(_glVertexAttrib3fv, "glVertexAttrib3fv","glVertexAttrib3fvARB");
|
||||
setGLExtensionFuncPtr(_glVertexAttrib4fv, "glVertexAttrib4fv","glVertexAttrib4fvARB");
|
||||
setGLExtensionFuncPtr(_glVertexAttrib4ubv, "glVertexAttrib4ubv","glVertexAttrib4ubvARB");
|
||||
setGLExtensionFuncPtr(_glVertexAttrib4Nubv, "glVertexAttrib4Nubv","glVertexAttrib4NubvARB");
|
||||
|
||||
_glGenBuffers = ((GenBuffersProc)osg::getGLExtensionFuncPtr("glGenBuffers","glGenBuffersARB"));
|
||||
_glBindBuffer = ((BindBufferProc)osg::getGLExtensionFuncPtr("glBindBuffer","glBindBufferARB"));
|
||||
_glBufferData = ((BufferDataProc)osg::getGLExtensionFuncPtr("glBufferData","glBufferDataARB"));
|
||||
_glBufferSubData = ((BufferSubDataProc)osg::getGLExtensionFuncPtr("glBufferSubData","glBufferSubDataARB"));
|
||||
_glDeleteBuffers = ((DeleteBuffersProc)osg::getGLExtensionFuncPtr("glDeleteBuffers","glDeleteBuffersARB"));
|
||||
_glIsBuffer = ((IsBufferProc)osg::getGLExtensionFuncPtr("glIsBuffer","glIsBufferARB"));
|
||||
_glGetBufferSubData = ((GetBufferSubDataProc)osg::getGLExtensionFuncPtr("glGetBufferSubData","glGetBufferSubDataARB"));
|
||||
_glMapBuffer = ((MapBufferProc)osg::getGLExtensionFuncPtr("glMapBuffer","glMapBufferARB"));
|
||||
_glUnmapBuffer = ((UnmapBufferProc)osg::getGLExtensionFuncPtr("glUnmapBuffer","glUnmapBufferARB"));
|
||||
_glGetBufferParameteriv = ((GetBufferParameterivProc)osg::getGLExtensionFuncPtr("glGetBufferParameteriv","glGetBufferParameterivARB"));
|
||||
_glGetBufferPointerv = ((GetBufferPointervProc)osg::getGLExtensionFuncPtr("glGetBufferPointerv","glGetBufferPointervARB"));
|
||||
setGLExtensionFuncPtr(_glGenBuffers, "glGenBuffers","glGenBuffersARB");
|
||||
setGLExtensionFuncPtr(_glBindBuffer, "glBindBuffer","glBindBufferARB");
|
||||
setGLExtensionFuncPtr(_glBufferData, "glBufferData","glBufferDataARB");
|
||||
setGLExtensionFuncPtr(_glBufferSubData, "glBufferSubData","glBufferSubDataARB");
|
||||
setGLExtensionFuncPtr(_glDeleteBuffers, "glDeleteBuffers","glDeleteBuffersARB");
|
||||
setGLExtensionFuncPtr(_glIsBuffer, "glIsBuffer","glIsBufferARB");
|
||||
setGLExtensionFuncPtr(_glGetBufferSubData, "glGetBufferSubData","glGetBufferSubDataARB");
|
||||
setGLExtensionFuncPtr(_glMapBuffer, "glMapBuffer","glMapBufferARB");
|
||||
setGLExtensionFuncPtr(_glUnmapBuffer, "glUnmapBuffer","glUnmapBufferARB");
|
||||
setGLExtensionFuncPtr(_glGetBufferParameteriv, "glGetBufferParameteriv","glGetBufferParameterivARB");
|
||||
setGLExtensionFuncPtr(_glGetBufferPointerv, "glGetBufferPointerv","glGetBufferPointervARB");
|
||||
|
||||
_glGenOcclusionQueries = ((GenOcclusionQueriesProc)osg::getGLExtensionFuncPtr("glGenOcclusionQueries","glGenOcclusionQueriesNV"));
|
||||
_glDeleteOcclusionQueries = ((DeleteOcclusionQueriesProc)osg::getGLExtensionFuncPtr("glDeleteOcclusionQueries","glDeleteOcclusionQueriesNV"));
|
||||
_glIsOcclusionQuery = ((IsOcclusionQueryProc)osg::getGLExtensionFuncPtr("glIsOcclusionQuery","_glIsOcclusionQueryNV"));
|
||||
_glBeginOcclusionQuery = ((BeginOcclusionQueryProc)osg::getGLExtensionFuncPtr("glBeginOcclusionQuery","glBeginOcclusionQueryNV"));
|
||||
_glEndOcclusionQuery = ((EndOcclusionQueryProc)osg::getGLExtensionFuncPtr("glEndOcclusionQuery","glEndOcclusionQueryNV"));
|
||||
_glGetOcclusionQueryiv = ((GetOcclusionQueryivProc)osg::getGLExtensionFuncPtr("glGetOcclusionQueryiv","glGetOcclusionQueryivNV"));
|
||||
_glGetOcclusionQueryuiv = ((GetOcclusionQueryuivProc)osg::getGLExtensionFuncPtr("glGetOcclusionQueryuiv","glGetOcclusionQueryuivNV"));
|
||||
setGLExtensionFuncPtr(_glGenOcclusionQueries, "glGenOcclusionQueries","glGenOcclusionQueriesNV");
|
||||
setGLExtensionFuncPtr(_glDeleteOcclusionQueries, "glDeleteOcclusionQueries","glDeleteOcclusionQueriesNV");
|
||||
setGLExtensionFuncPtr(_glIsOcclusionQuery, "glIsOcclusionQuery","_glIsOcclusionQueryNV");
|
||||
setGLExtensionFuncPtr(_glBeginOcclusionQuery, "glBeginOcclusionQuery","glBeginOcclusionQueryNV");
|
||||
setGLExtensionFuncPtr(_glEndOcclusionQuery, "glEndOcclusionQuery","glEndOcclusionQueryNV");
|
||||
setGLExtensionFuncPtr(_glGetOcclusionQueryiv, "glGetOcclusionQueryiv","glGetOcclusionQueryivNV");
|
||||
setGLExtensionFuncPtr(_glGetOcclusionQueryuiv, "glGetOcclusionQueryuiv","glGetOcclusionQueryuivNV");
|
||||
|
||||
_gl_gen_queries_arb = (GenQueriesProc)osg::getGLExtensionFuncPtr("glGenQueries", "glGenQueriesARB");
|
||||
_gl_delete_queries_arb = (DeleteQueriesProc)osg::getGLExtensionFuncPtr("glDeleteQueries", "glDeleteQueriesARB");
|
||||
_gl_is_query_arb = (IsQueryProc)osg::getGLExtensionFuncPtr("glIsQuery", "glIsQueryARB");
|
||||
_gl_begin_query_arb = (BeginQueryProc)osg::getGLExtensionFuncPtr("glBeginQuery", "glBeginQueryARB");
|
||||
_gl_end_query_arb = (EndQueryProc)osg::getGLExtensionFuncPtr("glEndQuery", "glEndQueryARB");
|
||||
_gl_get_queryiv_arb = (GetQueryivProc)osg::getGLExtensionFuncPtr("glGetQueryiv", "glGetQueryivARB");
|
||||
_gl_get_query_objectiv_arb = (GetQueryObjectivProc)osg::getGLExtensionFuncPtr("glGetQueryObjectiv","glGetQueryObjectivARB");
|
||||
_gl_get_query_objectuiv_arb = (GetQueryObjectuivProc)osg::getGLExtensionFuncPtr("glGetQueryObjectuiv","glGetQueryObjectuivARB");
|
||||
_gl_get_query_objectui64v = (GetQueryObjectui64vProc)osg::getGLExtensionFuncPtr("glGetQueryObjectui64v","glGetQueryObjectui64vEXT");
|
||||
setGLExtensionFuncPtr(_gl_gen_queries_arb, "glGenQueries", "glGenQueriesARB");
|
||||
setGLExtensionFuncPtr(_gl_delete_queries_arb, "glDeleteQueries", "glDeleteQueriesARB");
|
||||
setGLExtensionFuncPtr(_gl_is_query_arb, "glIsQuery", "glIsQueryARB");
|
||||
setGLExtensionFuncPtr(_gl_begin_query_arb, "glBeginQuery", "glBeginQueryARB");
|
||||
setGLExtensionFuncPtr(_gl_end_query_arb, "glEndQuery", "glEndQueryARB");
|
||||
setGLExtensionFuncPtr(_gl_get_queryiv_arb, "glGetQueryiv", "glGetQueryivARB");
|
||||
setGLExtensionFuncPtr(_gl_get_query_objectiv_arb, "glGetQueryObjectiv","glGetQueryObjectivARB");
|
||||
setGLExtensionFuncPtr(_gl_get_query_objectuiv_arb, "glGetQueryObjectuiv","glGetQueryObjectuivARB");
|
||||
setGLExtensionFuncPtr(_gl_get_query_objectui64v, "glGetQueryObjectui64v","glGetQueryObjectui64vEXT");
|
||||
}
|
||||
|
||||
void Drawable::Extensions::glFogCoordfv(const GLfloat* coord) const
|
||||
|
||||
@@ -250,19 +250,18 @@ void FragmentProgram::Extensions::setupGLExtensions(unsigned int contextID)
|
||||
{
|
||||
_isFragmentProgramSupported = isGLExtensionSupported(contextID,"GL_ARB_fragment_program");
|
||||
|
||||
_glBindProgram = osg::getGLExtensionFuncPtr("glBindProgramARB");
|
||||
_glGenPrograms = osg::getGLExtensionFuncPtr("glGenProgramsARB");
|
||||
_glDeletePrograms = osg::getGLExtensionFuncPtr("glDeleteProgramsARB");
|
||||
_glProgramString = osg::getGLExtensionFuncPtr("glProgramStringARB");
|
||||
_glProgramLocalParameter4fv = osg::getGLExtensionFuncPtr("glProgramLocalParameter4fvARB");
|
||||
setGLExtensionFuncPtr(_glBindProgram, "glBindProgramARB");
|
||||
setGLExtensionFuncPtr(_glGenPrograms, "glGenProgramsARB");
|
||||
setGLExtensionFuncPtr(_glDeletePrograms, "glDeleteProgramsARB");
|
||||
setGLExtensionFuncPtr(_glProgramString, "glProgramStringARB");
|
||||
setGLExtensionFuncPtr(_glProgramLocalParameter4fv, "glProgramLocalParameter4fvARB");
|
||||
}
|
||||
|
||||
void FragmentProgram::Extensions::glBindProgram(GLenum target, GLuint id) const
|
||||
{
|
||||
if (_glBindProgram)
|
||||
{
|
||||
typedef void (APIENTRY * BindProgramProc) (GLenum target, GLuint id);
|
||||
((BindProgramProc)_glBindProgram)(target,id);
|
||||
_glBindProgram(target,id);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -274,8 +273,7 @@ void FragmentProgram::Extensions::glGenPrograms(GLsizei n, GLuint *programs) con
|
||||
{
|
||||
if (_glGenPrograms)
|
||||
{
|
||||
typedef void (APIENTRY * GenProgramsProc) (GLsizei n, GLuint *programs);
|
||||
((GenProgramsProc)_glGenPrograms)(n,programs);
|
||||
_glGenPrograms(n,programs);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -287,8 +285,7 @@ void FragmentProgram::Extensions::glDeletePrograms(GLsizei n, GLuint *programs)
|
||||
{
|
||||
if (_glDeletePrograms)
|
||||
{
|
||||
typedef void (APIENTRY * DeleteProgramsProc) (GLsizei n, GLuint *programs);
|
||||
((DeleteProgramsProc)_glDeletePrograms)(n,programs);
|
||||
_glDeletePrograms(n,programs);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -300,8 +297,7 @@ void FragmentProgram::Extensions::glProgramString(GLenum target, GLenum format,
|
||||
{
|
||||
if (_glProgramString)
|
||||
{
|
||||
typedef void (APIENTRY * ProgramStringProc) (GLenum target, GLenum format, GLsizei len, const void *string);
|
||||
((ProgramStringProc)_glProgramString)(target,format, len, string);
|
||||
_glProgramString(target,format, len, string);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -313,8 +309,7 @@ void FragmentProgram::Extensions::glProgramLocalParameter4fv(GLenum target, GLui
|
||||
{
|
||||
if (_glProgramLocalParameter4fv)
|
||||
{
|
||||
typedef void (APIENTRY * ProgramLocalParameter4fvProc) (GLenum target, GLuint index, const GLfloat *params);
|
||||
((ProgramLocalParameter4fvProc)_glProgramLocalParameter4fv)(target, index, params);
|
||||
_glProgramLocalParameter4fv(target, index, params);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ FBOExtensions* FBOExtensions::instance(unsigned contextID, bool createIfNotInita
|
||||
/**************************************************************************
|
||||
* FBOExtensions
|
||||
**************************************************************************/
|
||||
#define LOAD_FBO_EXT(name) name = (T##name *)getGLExtensionFuncPtr(#name);
|
||||
#define LOAD_FBO_EXT(name) setGLExtensionFuncPtr(name, (#name))
|
||||
|
||||
FBOExtensions::FBOExtensions(unsigned int contextID)
|
||||
: _supported(false)
|
||||
|
||||
@@ -156,7 +156,6 @@ public:
|
||||
{
|
||||
osg::notify(osg::INFO)<<"resetting compileContext "<<_compileContext.get()<<" refCount "<<_compileContext->referenceCount()<<std::endl;
|
||||
|
||||
GraphicsContext* gc = _compileContext.get();
|
||||
_compileContext = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,6 @@ void BarrierOperation::operator () (Object* object)
|
||||
{
|
||||
if (_preBlockOp!=NO_OPERATION)
|
||||
{
|
||||
GraphicsContext* context = dynamic_cast<GraphicsContext*>(object);
|
||||
if (_preBlockOp==GL_FLUSH) glFlush();
|
||||
else if (_preBlockOp==GL_FINISH) glFinish();
|
||||
}
|
||||
|
||||
@@ -91,15 +91,14 @@ void Multisample::Extensions::setupGLExtensions(unsigned int contextID)
|
||||
_isMultisampleSupported = isGLExtensionSupported(contextID,"GL_ARB_multisample");
|
||||
_isMultisampleFilterHintSupported = isGLExtensionSupported(contextID,"GL_NV_multisample_filter_hint");
|
||||
|
||||
_glSampleCoverage = getGLExtensionFuncPtr("glSampleCoverageARB");
|
||||
setGLExtensionFuncPtr(_glSampleCoverage, "glSampleCoverageARB");
|
||||
}
|
||||
|
||||
void Multisample::Extensions::glSampleCoverage(GLclampf value, GLboolean invert) const
|
||||
{
|
||||
if (_glSampleCoverage)
|
||||
{
|
||||
typedef void (APIENTRY * GLSampleCoverageProc) (GLclampf value, GLboolean invert);
|
||||
((GLSampleCoverageProc)_glSampleCoverage)(value, invert);
|
||||
_glSampleCoverage(value, invert);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -135,22 +135,21 @@ void Point::Extensions::setupGLExtensions(unsigned int contextID)
|
||||
|
||||
_isPointSpriteCoordOriginSupported = strncmp((const char*)glGetString(GL_VERSION),"2.0",3)>=0;
|
||||
|
||||
_glPointParameteri = getGLExtensionFuncPtr("glPointParameteri", "glPointParameteriARB");
|
||||
if (!_glPointParameteri) _glPointParameteri = getGLExtensionFuncPtr("glPointParameteriEXT", "glPointParameteriSGIS");
|
||||
setGLExtensionFuncPtr(_glPointParameteri, "glPointParameteri", "glPointParameteriARB");
|
||||
if (!_glPointParameteri) setGLExtensionFuncPtr(_glPointParameteri, "glPointParameteriEXT", "glPointParameteriSGIS");
|
||||
|
||||
_glPointParameterf = getGLExtensionFuncPtr("glPointParameterf", "glPointParameterfARB");
|
||||
if (!_glPointParameterf) _glPointParameterf = getGLExtensionFuncPtr("glPointParameterfEXT", "glPointParameterfSGIS");
|
||||
setGLExtensionFuncPtr(_glPointParameterf, "glPointParameterf", "glPointParameterfARB");
|
||||
if (!_glPointParameterf) setGLExtensionFuncPtr(_glPointParameterf, "glPointParameterfEXT", "glPointParameterfSGIS");
|
||||
|
||||
_glPointParameterfv = getGLExtensionFuncPtr("glPointParameterfv", "glPointParameterfvARB");
|
||||
if (!_glPointParameterfv) _glPointParameterfv = getGLExtensionFuncPtr("glPointParameterfvEXT", "glPointParameterfvSGIS");
|
||||
setGLExtensionFuncPtr(_glPointParameterfv, "glPointParameterfv", "glPointParameterfvARB");
|
||||
if (!_glPointParameterfv) setGLExtensionFuncPtr(_glPointParameterfv, "glPointParameterfvEXT", "glPointParameterfvSGIS");
|
||||
}
|
||||
|
||||
void Point::Extensions::glPointParameteri(GLenum pname, GLint param) const
|
||||
{
|
||||
if (_glPointParameteri)
|
||||
{
|
||||
typedef void (APIENTRY * GLPointParameteriProc) (GLenum pname, GLint param);
|
||||
((GLPointParameteriProc)_glPointParameteri)(pname, param);
|
||||
_glPointParameteri(pname, param);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -162,8 +161,7 @@ void Point::Extensions::glPointParameterf(GLenum pname, GLfloat param) const
|
||||
{
|
||||
if (_glPointParameterf)
|
||||
{
|
||||
typedef void (APIENTRY * GLPointParameterfProc) (GLenum pname, GLfloat param);
|
||||
((GLPointParameterfProc)_glPointParameterf)(pname, param);
|
||||
_glPointParameterf(pname, param);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -175,8 +173,7 @@ void Point::Extensions::glPointParameterfv(GLenum pname, const GLfloat *params)
|
||||
{
|
||||
if (_glPointParameterfv)
|
||||
{
|
||||
typedef void (APIENTRY * GLPointParameterfvProc) (GLenum pname, const GLfloat *params);
|
||||
((GLPointParameterfvProc)_glPointParameterfv)(pname, params);
|
||||
_glPointParameterfv(pname, params);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1473,17 +1473,16 @@ void Texture::Extensions::setupGLExtensions(unsigned int contextID)
|
||||
_numTextureUnits = 1;
|
||||
}
|
||||
|
||||
_glCompressedTexImage2D = getGLExtensionFuncPtr("glCompressedTexImage2D","glCompressedTexImage2DARB");
|
||||
_glCompressedTexSubImage2D = getGLExtensionFuncPtr("glCompressedTexSubImage2D","glCompressedTexSubImage2DARB");
|
||||
_glGetCompressedTexImage = getGLExtensionFuncPtr("glGetCompressedTexImage","glGetCompressedTexImageARB");;
|
||||
setGLExtensionFuncPtr(_glCompressedTexImage2D, "glCompressedTexImage2D","glCompressedTexImage2DARB");
|
||||
setGLExtensionFuncPtr(_glCompressedTexSubImage2D, "glCompressedTexSubImage2D","glCompressedTexSubImage2DARB");
|
||||
setGLExtensionFuncPtr(_glGetCompressedTexImage, "glGetCompressedTexImage","glGetCompressedTexImageARB");
|
||||
}
|
||||
|
||||
void Texture::Extensions::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) const
|
||||
{
|
||||
if (_glCompressedTexImage2D)
|
||||
{
|
||||
typedef void (APIENTRY * CompressedTexImage2DArbProc) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||
((CompressedTexImage2DArbProc)_glCompressedTexImage2D)(target, level, internalformat, width, height, border, imageSize, data);
|
||||
_glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1496,8 +1495,7 @@ void Texture::Extensions::glCompressedTexSubImage2D(GLenum target, GLint level,
|
||||
{
|
||||
if (_glCompressedTexSubImage2D)
|
||||
{
|
||||
typedef void (APIENTRY * CompressedTexSubImage2DArbProc) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
|
||||
((CompressedTexSubImage2DArbProc)_glCompressedTexSubImage2D)(target, level, xoffset, yoffset, width, height, format, imageSize, data);
|
||||
_glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1509,8 +1507,7 @@ void Texture::Extensions::glGetCompressedTexImage(GLenum target, GLint level, GL
|
||||
{
|
||||
if (_glGetCompressedTexImage)
|
||||
{
|
||||
typedef void (APIENTRY * GetCompressedTexImageArbProc) (GLenum target, GLint level, GLvoid *data);
|
||||
((GetCompressedTexImageArbProc)_glGetCompressedTexImage)(target, level, data);
|
||||
_glGetCompressedTexImage(target, level, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -149,19 +149,12 @@ BEGIN_OBJECT_REFLECTOR(osg::BlendColor::Extensions)
|
||||
__bool__isBlendColorSupported,
|
||||
"",
|
||||
"");
|
||||
I_Method1(void, setBlendColorProc, IN, void *, ptr,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setBlendColorProc__void_P1,
|
||||
"",
|
||||
"");
|
||||
I_Method4(void, glBlendColor, IN, GLclampf, red, IN, GLclampf, green, IN, GLclampf, blue, IN, GLclampf, alpha,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__glBlendColor__GLclampf__GLclampf__GLclampf__GLclampf,
|
||||
"",
|
||||
"");
|
||||
I_SimpleProperty(void *, BlendColorProc,
|
||||
0,
|
||||
__void__setBlendColorProc__void_P1);
|
||||
|
||||
I_SimpleProperty(bool, BlendColorSupported,
|
||||
0,
|
||||
__void__setBlendColorSupported__bool);
|
||||
|
||||
@@ -165,19 +165,12 @@ BEGIN_OBJECT_REFLECTOR(osg::BlendEquation::Extensions)
|
||||
__bool__isLogicOpSupported,
|
||||
"",
|
||||
"");
|
||||
I_Method1(void, setBlendEquationProc, IN, void *, ptr,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setBlendEquationProc__void_P1,
|
||||
"",
|
||||
"");
|
||||
I_Method1(void, glBlendEquation, IN, GLenum, mode,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__glBlendEquation__GLenum,
|
||||
"",
|
||||
"");
|
||||
I_SimpleProperty(void *, BlendEquationProc,
|
||||
0,
|
||||
__void__setBlendEquationProc__void_P1);
|
||||
|
||||
I_SimpleProperty(bool, BlendEquationSupported,
|
||||
0,
|
||||
__void__setBlendEquationSupported__bool);
|
||||
|
||||
@@ -240,19 +240,12 @@ BEGIN_OBJECT_REFLECTOR(osg::BlendFunc::Extensions)
|
||||
__bool__isBlendFuncSeparateSupported,
|
||||
"",
|
||||
"");
|
||||
I_Method1(void, setBlendFuncSeparateProc, IN, void *, ptr,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setBlendFuncSeparateProc__void_P1,
|
||||
"",
|
||||
"");
|
||||
I_Method4(void, glBlendFuncSeparate, IN, GLenum, sfactorRGB, IN, GLenum, dfactorRGB, IN, GLenum, sfactorAlpha, IN, GLenum, dfactorAlpha,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__glBlendFuncSeparate__GLenum__GLenum__GLenum__GLenum,
|
||||
"",
|
||||
"");
|
||||
I_SimpleProperty(void *, BlendFuncSeparateProc,
|
||||
0,
|
||||
__void__setBlendFuncSeparateProc__void_P1);
|
||||
|
||||
I_SimpleProperty(bool, BlendFuncSeparateSupported,
|
||||
0,
|
||||
__void__setBlendFuncSeparateSupported__bool);
|
||||
|
||||
@@ -163,19 +163,12 @@ BEGIN_OBJECT_REFLECTOR(osg::ClampColor::Extensions)
|
||||
__bool__isClampColorSupported,
|
||||
"",
|
||||
"");
|
||||
I_Method1(void, setClampColorProc, IN, void *, ptr,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setClampColorProc__void_P1,
|
||||
"",
|
||||
"");
|
||||
I_Method2(void, glClampColor, IN, GLenum, target, IN, GLenum, mode,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__glClampColor__GLenum__GLenum,
|
||||
"",
|
||||
"");
|
||||
I_SimpleProperty(void *, ClampColorProc,
|
||||
0,
|
||||
__void__setClampColorProc__void_P1);
|
||||
|
||||
I_SimpleProperty(bool, ClampColorSupported,
|
||||
0,
|
||||
__void__setClampColorSupported__bool);
|
||||
|
||||
@@ -253,6 +253,11 @@ BEGIN_OBJECT_REFLECTOR(osg::FragmentProgram::Extensions)
|
||||
__void__glProgramLocalParameter4fv__GLenum__GLuint__C5_GLfloat_P1,
|
||||
"",
|
||||
"");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
I_SimpleProperty(bool, FragmentProgramSupported,
|
||||
0,
|
||||
__void__setFragmentProgramSupported__bool);
|
||||
|
||||
@@ -181,24 +181,17 @@ BEGIN_OBJECT_REFLECTOR(osg::Multisample::Extensions)
|
||||
__bool__isMultisampleFilterHintSupported,
|
||||
"",
|
||||
"");
|
||||
I_Method1(void, setSampleCoverageProc, IN, void *, ptr,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setSampleCoverageProc__void_P1,
|
||||
"",
|
||||
"");
|
||||
I_Method2(void, glSampleCoverage, IN, GLclampf, value, IN, GLboolean, invert,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__glSampleCoverage__GLclampf__GLboolean,
|
||||
"",
|
||||
"");
|
||||
|
||||
I_SimpleProperty(bool, MultisampleFilterHintSupported,
|
||||
0,
|
||||
__void__setMultisampleFilterHintSupported__bool);
|
||||
I_SimpleProperty(bool, MultisampleSupported,
|
||||
0,
|
||||
__void__setMultisampleSupported__bool);
|
||||
I_SimpleProperty(void *, SampleCoverageProc,
|
||||
0,
|
||||
__void__setSampleCoverageProc__void_P1);
|
||||
END_REFLECTOR
|
||||
|
||||
|
||||
@@ -216,6 +216,9 @@ BEGIN_OBJECT_REFLECTOR(osg::Point::Extensions)
|
||||
__void__glPointParameterfv__GLenum__C5_GLfloat_P1,
|
||||
"",
|
||||
"");
|
||||
|
||||
|
||||
|
||||
I_SimpleProperty(bool, PointParametersSupported,
|
||||
0,
|
||||
__void__setPointParametersSupported__bool);
|
||||
|
||||
@@ -725,9 +725,9 @@ BEGIN_OBJECT_REFLECTOR(osg::Texture::Extensions)
|
||||
__bool__isCompressedTexImage2DSupported,
|
||||
"",
|
||||
"");
|
||||
I_Method1(void, setCompressedTexImage2DProc, IN, void *, ptr,
|
||||
I_Method0(bool, isCompressedTexSubImage2DSupported,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setCompressedTexImage2DProc__void_P1,
|
||||
__bool__isCompressedTexSubImage2DSupported,
|
||||
"",
|
||||
"");
|
||||
I_Method8(void, glCompressedTexImage2D, IN, GLenum, target, IN, GLint, level, IN, GLenum, internalformat, IN, GLsizei, width, IN, GLsizei, height, IN, GLint, border, IN, GLsizei, imageSize, IN, const GLvoid *, data,
|
||||
@@ -735,26 +735,11 @@ BEGIN_OBJECT_REFLECTOR(osg::Texture::Extensions)
|
||||
__void__glCompressedTexImage2D__GLenum__GLint__GLenum__GLsizei__GLsizei__GLint__GLsizei__C5_GLvoid_P1,
|
||||
"",
|
||||
"");
|
||||
I_Method0(bool, isCompressedTexSubImage2DSupported,
|
||||
Properties::NON_VIRTUAL,
|
||||
__bool__isCompressedTexSubImage2DSupported,
|
||||
"",
|
||||
"");
|
||||
I_Method1(void, setCompressedTexSubImage2DProc, IN, void *, ptr,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setCompressedTexSubImage2DProc__void_P1,
|
||||
"",
|
||||
"");
|
||||
I_Method9(void, glCompressedTexSubImage2D, IN, GLenum, target, IN, GLint, level, IN, GLint, xoffset, IN, GLint, yoffset, IN, GLsizei, width, IN, GLsizei, height, IN, GLenum, format, IN, GLsizei, type, IN, const GLvoid *, data,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__glCompressedTexSubImage2D__GLenum__GLint__GLint__GLint__GLsizei__GLsizei__GLenum__GLsizei__C5_GLvoid_P1,
|
||||
"",
|
||||
"");
|
||||
I_Method1(void, setGetCompressedTexImageProc, IN, void *, ptr,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__setGetCompressedTexImageProc__void_P1,
|
||||
"",
|
||||
"");
|
||||
I_Method3(void, glGetCompressedTexImage, IN, GLenum, target, IN, GLint, level, IN, GLvoid *, data,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__glGetCompressedTexImage__GLenum__GLint__GLvoid_P1,
|
||||
@@ -770,18 +755,12 @@ BEGIN_OBJECT_REFLECTOR(osg::Texture::Extensions)
|
||||
__bool__isNonPowerOfTwoTextureSupported__GLenum,
|
||||
"",
|
||||
"");
|
||||
I_SimpleProperty(void *, CompressedTexImage2DProc,
|
||||
0,
|
||||
__void__setCompressedTexImage2DProc__void_P1);
|
||||
I_SimpleProperty(void *, CompressedTexSubImage2DProc,
|
||||
0,
|
||||
__void__setCompressedTexSubImage2DProc__void_P1);
|
||||
|
||||
|
||||
|
||||
I_SimpleProperty(bool, GenerateMipMapSupported,
|
||||
0,
|
||||
__void__setGenerateMipMapSupported__bool);
|
||||
I_SimpleProperty(void *, GetCompressedTexImageProc,
|
||||
0,
|
||||
__void__setGetCompressedTexImageProc__void_P1);
|
||||
I_SimpleProperty(GLint, MaxTextureSize,
|
||||
0,
|
||||
__void__setMaxTextureSize__GLint);
|
||||
|
||||
Reference in New Issue
Block a user