From a3f137094cd965d27e1b088499dd609b81a91906 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 1 Apr 2003 16:41:50 +0000 Subject: 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. --- src/mesa/main/dd.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/mesa/main/dd.h') 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(). -- cgit v1.2.3