/*
* Mesa 3-D graphics library
- * Version: 6.1
+ * Version: 6.5
*
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
/* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */
struct gl_pixelstore_attrib;
+struct mesa_display_list;
/**
* Device driver function table.
GLuint *width, GLuint *height );
/**
- * Resize the driver's depth/stencil/accum/back buffers to match the
- * size given in the GLframebuffer struct.
- *
- * This is typically called when Mesa detects that a window size has changed.
+ * Resize the given framebuffer to the given size.
*/
- void (*ResizeBuffers)( GLframebuffer *buffer );
+ void (*ResizeBuffers)( GLcontext *ctx, GLframebuffer *fb,
+ GLuint width, GLuint height);
/**
* Called whenever an error is generated.
* This function must respect all rasterization state, glPixelTransfer(),
* glPixelZoom(), etc.
*/
- void (*CopyPixels)( GLcontext *ctx,
- GLint srcx, GLint srcy,
- GLsizei width, GLsizei height,
- GLint dstx, GLint dsty, GLenum type );
+ void (*CopyPixels)( GLcontext *ctx, GLint srcx, GLint srcy,
+ GLsizei width, GLsizei height,
+ GLint dstx, GLint dsty, GLenum type );
/**
* This is called by glBitmap().
struct gl_texture_object *texObj,
struct gl_texture_image *texImage );
+ /**
+ * Called by glGetTexImage().
+ */
+ void (*GetTexImage)( GLcontext *ctx, GLenum target, GLint level,
+ GLenum format, GLenum type, GLvoid *pixels,
+ const struct gl_texture_object *texObj,
+ const struct gl_texture_image *texImage );
+
/**
* Called by glCopyTexImage1D().
*
struct gl_texture_object *texObj,
struct gl_texture_image *texImage);
+
+ /**
+ * Called by glGetCompressedTexImage.
+ */
+ void (*GetCompressedTexImage)(GLcontext *ctx, GLenum target, GLint level,
+ GLvoid *img,
+ const struct gl_texture_object *texObj,
+ const struct gl_texture_image *texImage);
+
/**
* Called to query number of bytes of storage needed to store the
* specified compressed texture.
*/
struct gl_texture_image * (*NewTextureImage)( GLcontext *ctx );
+ /**
+ * Called to free tImage->Data.
+ */
+ void (*FreeTexImageData)( GLcontext *ctx, struct gl_texture_image *tImage );
+
+ /**
+ * Note: no context argument. This function doesn't initially look
+ * like it belongs here, except that the driver is the only entity
+ * that knows for sure how the texture memory is allocated - via
+ * the above callbacks. There is then an argument that the driver
+ * knows what memcpy paths might be fast. Typically this is invoked with
+ *
+ * to -- a pointer into texture memory allocated by NewTextureImage() above.
+ * from -- a pointer into client memory or a mesa temporary.
+ * sz -- nr bytes to copy.
+ */
+ void* (*TextureMemCpy)( void *to, const void *from, size_t sz );
+
/**
* Called by glAreTextureResident().
*/
void (*DepthRange)(GLcontext *ctx, GLclampd nearval, GLclampd farval);
/** Specify the current buffer for writing */
void (*DrawBuffer)( GLcontext *ctx, GLenum buffer );
+ /** Specify the buffers for writing for fragment programs*/
+ void (*DrawBuffers)( GLcontext *ctx, GLsizei n, const GLenum *buffers );
/** Enable or disable server-side gl capabilities */
void (*Enable)(GLcontext *ctx, GLenum cap, GLboolean state);
/** Specify fog parameters */
void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
/** Select flat or smooth shading */
void (*ShadeModel)(GLcontext *ctx, GLenum mode);
- /** Set function and reference value for stencil testing */
- void (*StencilFunc)(GLcontext *ctx, GLenum func, GLint ref, GLuint mask);
- /** Control the writing of individual bits in the stencil planes */
- void (*StencilMask)(GLcontext *ctx, GLuint mask);
- /** Set stencil test actions */
- void (*StencilOp)(GLcontext *ctx, GLenum fail, GLenum zfail, GLenum zpass);
- void (*ActiveStencilFace)(GLcontext *ctx, GLuint face);
+ /** OpenGL 2.0 two-sided StencilFunc */
+ void (*StencilFuncSeparate)(GLcontext *ctx, GLenum face, GLenum func,
+ GLint ref, GLuint mask);
+ /** OpenGL 2.0 two-sided StencilMask */
+ void (*StencilMaskSeparate)(GLcontext *ctx, GLenum face, GLuint mask);
+ /** OpenGL 2.0 two-sided StencilOp */
+ void (*StencilOpSeparate)(GLcontext *ctx, GLenum face, GLenum fail,
+ GLenum zfail, GLenum zpass);
/** Control the generation of texture coordinates */
void (*TexGen)(GLcontext *ctx, GLenum coord, GLenum pname,
const GLfloat *params);
/*@}*/
- /*@}*/
-
-
/**
* \name State-query functions
*
/**
- * \name Vertex buffer object functions
+ * \name Vertex/pixel buffer object functions
*/
#if FEATURE_ARB_vertex_buffer_object
/*@{*/
/*@}*/
#endif
+ /**
+ * \name Functions for GL_EXT_framebuffer_object
+ */
+#if FEATURE_EXT_framebuffer_object
+ /*@{*/
+ struct gl_framebuffer * (*NewFramebuffer)(GLcontext *ctx, GLuint name);
+ struct gl_renderbuffer * (*NewRenderbuffer)(GLcontext *ctx, GLuint name);
+ void (*FramebufferRenderbuffer)(GLcontext *ctx,
+ struct gl_renderbuffer_attachment *att,
+ struct gl_renderbuffer *rb);
+ void (*RenderbufferTexture)(GLcontext *ctx,
+ struct gl_renderbuffer_attachment *att,
+ struct gl_texture_object *texObj,
+ GLenum texTarget, GLuint level, GLuint zoffset);
+ /*@}*/
+#endif
+#if FEATURE_EXT_framebuffer_blit
+ void (*BlitFramebuffer)(GLcontext *ctx,
+ GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
+ GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
+ GLbitfield mask, GLenum filter);
+#endif
+
+ /**
+ * \name Query objects
+ */
+ /*@{*/
+ struct gl_query_object * (*NewQueryObject)(GLcontext *ctx, GLuint id);
+ void (*BeginQuery)(GLcontext *ctx, GLenum target,
+ struct gl_query_object *q);
+ void (*EndQuery)(GLcontext *ctx, GLenum target, struct gl_query_object *q);
+ /*@}*/
+
+
/**
* \name Support for multiple T&L engines
*/
*/
void (*LightingSpaceChange)( GLcontext *ctx );
- /**
- * Let the T&L component know when the context becomes current.
- */
- void (*MakeCurrent)( GLcontext *ctx, GLframebuffer *drawBuffer,
- GLframebuffer *readBuffer );
-
/**
* Called by glNewList().
*
void (*EndList)( GLcontext *ctx );
/**
- * Called by glCallList(s), but not recursively.
+ * Called by glCallList(s).
*
* Notify the T&L component before and after calling a display list.
- * Called by glCallList(s), but not recursively.
*/
- void (*BeginCallList)( GLcontext *ctx, GLuint list );
+ void (*BeginCallList)( GLcontext *ctx,
+ struct mesa_display_list *dlist );
/**
* Called by glEndCallList().
*
void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v );
void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v );
+ void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x );
+ void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v );
+ void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y );
+ void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v );
+ void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
+ void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v );
+ void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
+ void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v );
/*@}*/
/*