Updates the osg::Texture3D::Extensions interface to support the standardisation

of extensions supported across multiple graphics contexts.
This commit is contained in:
Robert Osfield
2002-09-14 10:38:28 +00:00
parent 6d21fbd6cf
commit ce36cda0cc
2 changed files with 49 additions and 9 deletions

View File

@@ -100,6 +100,12 @@ class SG_EXPORT Texture3D : public Texture
public:
Extensions();
Extensions(const Extensions& rhs);
void lowestCommonDenominator(const Extensions& rhs);
void setupGLExtenions();
bool isTexture3DSupported() const { return _isTexture3DSupported; }
bool isTexture3DFast() const { return _isTexture3DFast; }
GLint maxTexture3DSize() const { return _maxTexture3DSize; }
@@ -113,11 +119,6 @@ class SG_EXPORT Texture3D : public Texture
~Extensions() {}
typedef void (APIENTRY * GLTexImage3DProc) ( GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
typedef void (APIENTRY * GLTexSubImage3DProc) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
typedef void (APIENTRY * GLCopyTexSubImageProc) ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height );
typedef void (APIENTRY * GLUBuild3DMipMapsProc) ( GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *data);
bool _isTexture3DSupported;
bool _isTexture3DFast;
GLint _maxTexture3DSize;
@@ -137,6 +138,11 @@ class SG_EXPORT Texture3D : public Texture
* only be created with the graphics context associated with ContextID..*/
static const Extensions* getExtensions(uint 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(uint contextID,Extensions* extensions);
protected :
virtual ~Texture3D();