summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/dd.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-04-01 16:41:50 +0000
committerBrian Paul <[email protected]>2003-04-01 16:41:50 +0000
commita3f137094cd965d27e1b088499dd609b81a91906 (patch)
tree76d361c0998c5fbe55ce7d665ac8f1d2ca6e2e0f /src/mesa/main/dd.h
parent926c34f89453c9b0455910bbdbe20b52d909d962 (diff)
New device driver hooks for texture object and texture image creation to
allow drivers to implement C++-like inheritance via containment. Lots of assorted clean-ups related to texture objects.
Diffstat (limited to 'src/mesa/main/dd.h')
-rw-r--r--src/mesa/main/dd.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index d6f0da1c69e..59316ca0549 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -1,4 +1,4 @@
-/* $Id: dd.h,v 1.74 2002/10/11 17:41:04 brianp Exp $ */
+/* $Id: dd.h,v 1.75 2003/04/01 16:41:52 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -51,7 +51,6 @@ struct gl_pixelstore_attrib;
* Device Driver function table.
*/
struct dd_function_table {
-
const GLubyte * (*GetString)( GLcontext *ctx, GLenum name );
/* Return a string as needed by glGetString().
* Only the GL_RENDERER token must be implemented. Otherwise,
@@ -354,8 +353,12 @@ struct dd_function_table {
/* Called by glBindTexture().
*/
- void (*CreateTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
- /* Called when a texture object is created.
+ struct gl_texture_object * (*NewTextureObject)( GLcontext *ctx, GLuint name,
+ GLenum target );
+ /* Called to allocate a new texture object.
+ * NOTE: this function pointer should be initialized by drivers _BEFORE_
+ * calling _mesa_initialize_context() since context initialization involves
+ * allocating some texture objects!
*/
void (*DeleteTexture)( GLcontext *ctx, struct gl_texture_object *tObj );
@@ -363,6 +366,10 @@ struct dd_function_table {
* should free anything attached to the DriverData pointers.
*/
+ struct gl_texture_image * (*NewTextureImage)( GLcontext *ctx );
+ /* Called to allocate a new texture image object.
+ */
+
GLboolean (*IsTextureResident)( GLcontext *ctx,
struct gl_texture_object *t );
/* Called by glAreTextureResident().