📄 dd.h
字号:
/** * \name Vertex/pixel buffer object functions */#if FEATURE_ARB_vertex_buffer_object /*@{*/ void (*BindBuffer)( GLcontext *ctx, GLenum target, struct gl_buffer_object *obj ); struct gl_buffer_object * (*NewBufferObject)( GLcontext *ctx, GLuint buffer, GLenum target ); void (*DeleteBuffer)( GLcontext *ctx, struct gl_buffer_object *obj ); void (*BufferData)( GLcontext *ctx, GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage, struct gl_buffer_object *obj ); void (*BufferSubData)( GLcontext *ctx, GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data, struct gl_buffer_object *obj ); void (*GetBufferSubData)( GLcontext *ctx, GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data, struct gl_buffer_object *obj ); void * (*MapBuffer)( GLcontext *ctx, GLenum target, GLenum access, struct gl_buffer_object *obj ); GLboolean (*UnmapBuffer)( GLcontext *ctx, GLenum target, struct gl_buffer_object *obj ); /*@}*/#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 (*BindFramebuffer)(GLcontext *ctx, GLenum target, struct gl_framebuffer *fb, struct gl_framebuffer *fbread); void (*FramebufferRenderbuffer)(GLcontext *ctx, struct gl_framebuffer *fb, GLenum attachment, struct gl_renderbuffer *rb); void (*RenderTexture)(GLcontext *ctx, struct gl_framebuffer *fb, struct gl_renderbuffer_attachment *att); void (*FinishRenderTexture)(GLcontext *ctx, struct gl_renderbuffer_attachment *att); /*@}*/#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 Vertex Array objects */ /*@{*/ struct gl_array_object * (*NewArrayObject)(GLcontext *ctx, GLuint id); void (*DeleteArrayObject)(GLcontext *ctx, struct gl_array_object *obj); void (*BindArrayObject)(GLcontext *ctx, struct gl_array_object *obj); /*@}*/ /** * \name GLSL-related functions (ARB extensions and OpenGL 2.x) */ /*@{*/ void (*AttachShader)(GLcontext *ctx, GLuint program, GLuint shader); void (*BindAttribLocation)(GLcontext *ctx, GLuint program, GLuint index, const GLcharARB *name); void (*CompileShader)(GLcontext *ctx, GLuint shader); GLuint (*CreateShader)(GLcontext *ctx, GLenum type); GLuint (*CreateProgram)(GLcontext *ctx); void (*DeleteProgram2)(GLcontext *ctx, GLuint program); void (*DeleteShader)(GLcontext *ctx, GLuint shader); void (*DetachShader)(GLcontext *ctx, GLuint program, GLuint shader); void (*GetActiveAttrib)(GLcontext *ctx, GLuint program, GLuint index, GLsizei maxLength, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); void (*GetActiveUniform)(GLcontext *ctx, GLuint program, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); void (*GetAttachedShaders)(GLcontext *ctx, GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); GLint (*GetAttribLocation)(GLcontext *ctx, GLuint program, const GLcharARB *name); GLuint (*GetHandle)(GLcontext *ctx, GLenum pname); void (*GetProgramiv)(GLcontext *ctx, GLuint program, GLenum pname, GLint *params); void (*GetProgramInfoLog)(GLcontext *ctx, GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); void (*GetShaderiv)(GLcontext *ctx, GLuint shader, GLenum pname, GLint *params); void (*GetShaderInfoLog)(GLcontext *ctx, GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); void (*GetShaderSource)(GLcontext *ctx, GLuint shader, GLsizei maxLength, GLsizei *length, GLcharARB *sourceOut); void (*GetUniformfv)(GLcontext *ctx, GLuint program, GLint location, GLfloat *params); void (*GetUniformiv)(GLcontext *ctx, GLuint program, GLint location, GLint *params); GLint (*GetUniformLocation)(GLcontext *ctx, GLuint program, const GLcharARB *name); GLboolean (*IsProgram)(GLcontext *ctx, GLuint name); GLboolean (*IsShader)(GLcontext *ctx, GLuint name); void (*LinkProgram)(GLcontext *ctx, GLuint program); void (*ShaderSource)(GLcontext *ctx, GLuint shader, const GLchar *source); void (*Uniform)(GLcontext *ctx, GLint location, GLsizei count, const GLvoid *values, GLenum type); void (*UniformMatrix)(GLcontext *ctx, GLint cols, GLint rows, GLenum matrixType, GLint location, GLsizei count, GLboolean transpose, const GLfloat *values); void (*UseProgram)(GLcontext *ctx, GLuint program); void (*ValidateProgram)(GLcontext *ctx, GLuint program); /* XXX many more to come */ /*@}*/ /** * \name Support for multiple T&L engines */ /*@{*/ /** * Bitmask of state changes that require the current T&L module to be * validated, using ValidateTnlModule() below. */ GLuint NeedValidate; /** * Validate the current T&L module. * * This is called directly after UpdateState() when a state change that has * occurred matches the dd_function_table::NeedValidate bitmask above. This * ensures all computed values are up to date, thus allowing the driver to * decide if the current T&L module needs to be swapped out. * * This must be non-NULL if a driver installs a custom T&L module and sets * the dd_function_table::NeedValidate bitmask, but may be NULL otherwise. */ void (*ValidateTnlModule)( GLcontext *ctx, GLuint new_state );#define PRIM_OUTSIDE_BEGIN_END GL_POLYGON+1#define PRIM_INSIDE_UNKNOWN_PRIM GL_POLYGON+2#define PRIM_UNKNOWN GL_POLYGON+3 /** * Set by the driver-supplied T&L engine. * * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd(). */ GLuint CurrentExecPrimitive; /** * Current state of an in-progress compilation. * * May take on any of the additional values PRIM_OUTSIDE_BEGIN_END, * PRIM_INSIDE_UNKNOWN_PRIM or PRIM_UNKNOWN defined above. */ GLuint CurrentSavePrimitive;#define FLUSH_STORED_VERTICES 0x1#define FLUSH_UPDATE_CURRENT 0x2 /** * Set by the driver-supplied T&L engine whenever vertices are buffered * between glBegin()/glEnd() objects or __GLcontextRec::Current is not * updated. * * The dd_function_table::FlushVertices call below may be used to resolve * these conditions. */ GLuint NeedFlush; GLuint SaveNeedFlush; /** * If inside glBegin()/glEnd(), it should ASSERT(0). Otherwise, if * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered * vertices, if FLUSH_UPDATE_CURRENT bit is set updates * __GLcontextRec::Current and gl_light_attrib::Material * * Note that the default T&L engine never clears the * FLUSH_UPDATE_CURRENT bit, even after performing the update. */ void (*FlushVertices)( GLcontext *ctx, GLuint flags ); void (*SaveFlushVertices)( GLcontext *ctx ); /** * Give the driver the opportunity to hook in its own vtxfmt for * compiling optimized display lists. This is called on each valid * glBegin() during list compilation. */ GLboolean (*NotifySaveBegin)( GLcontext *ctx, GLenum mode ); /** * Notify driver that the special derived value _NeedEyeCoords has * changed. */ void (*LightingSpaceChange)( GLcontext *ctx ); /** * Called by glNewList(). * * Let the T&L component know what is going on with display lists * in time to make changes to dispatch tables, etc. */ void (*NewList)( GLcontext *ctx, GLuint list, GLenum mode ); /** * Called by glEndList(). * * \sa dd_function_table::NewList. */ void (*EndList)( GLcontext *ctx ); /** * Called by glCallList(s). * * Notify the T&L component before and after calling a display list. */ void (*BeginCallList)( GLcontext *ctx, struct mesa_display_list *dlist ); /** * Called by glEndCallList(). * * \sa dd_function_table::BeginCallList. */ void (*EndCallList)( GLcontext *ctx );};/** * Transform/Clip/Lighting interface * * Drivers present a reduced set of the functions possible in * glBegin()/glEnd() objects. Core mesa provides translation stubs for the * remaining functions to map down to these entry points. * * These are the initial values to be installed into dispatch by * mesa. If the T&L driver wants to modify the dispatch table * while installed, it must do so itself. It would be possible for * the vertexformat to install it's own initial values for these * functions, but this way there is an obvious list of what is * expected of the driver. * * If the driver wants to hook in entry points other than those * listed, it must restore them to their original values in * the disable() callback, below. */typedef struct { /** * \name Vertex */ /*@{*/ void (GLAPIENTRYP ArrayElement)( GLint ); /* NOTE */ void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat ); void (GLAPIENTRYP Color3fv)( const GLfloat * ); void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat ); void (GLAPIENTRYP Color4fv)( const GLfloat * ); void (GLAPIENTRYP EdgeFlag)( GLboolean ); void (GLAPIENTRYP EvalCoord1f)( GLfloat ); /* NOTE */ void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * ); /* NOTE */ void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat ); /* NOTE */ void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * ); /* NOTE */ void (GLAPIENTRYP EvalPoint1)( GLint ); /* NOTE */ void (GLAPIENTRYP EvalPoint2)( GLint, GLint ); /* NOTE */ void (GLAPIENTRYP FogCoordfEXT)( GLfloat ); void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * ); void (GLAPIENTRYP Indexf)( GLfloat ); void (GLAPIENTRYP Indexfv)( const GLfloat * ); void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * ); /* NOTE */ void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat ); void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * ); void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat ); void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * ); void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat ); void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * ); void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ); void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * ); void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat ); void (GLAPIENTRYP Normal3fv)( const GLfloat * ); void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat ); void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * ); void (GLAPIENTRYP TexCoord1f)( GLfloat ); void (GLAPIENTRYP TexCoord1fv)( const GLfloat * ); void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat ); void (GLAPIENTRYP TexCoord2fv)( const GLfloat * ); void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat ); void (GLAPIENTRYP TexCoord3fv)( const GLfloat * ); void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat ); void (GLAPIENTRYP TexCoord4fv)( const GLfloat * ); void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat ); void (GLAPIENTRYP Vertex2fv)( const GLfloat * ); void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat ); void (GLAPIENTRYP Vertex3fv)( const GLfloat * ); void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat ); void (GLAPIENTRYP Vertex4fv)( const GLfloat * ); void (GLAPIENTRYP CallList)( GLuint ); /* NOTE */ void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * ); /* NOTE */ void (GLAPIENTRYP Begin)( GLenum ); void (GLAPIENTRYP End)( void ); /* GL_NV_vertex_program */ void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x ); void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v ); void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y ); void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v ); void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); 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 );#if FEATURE_ARB_vertex_program 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 );#endif /*@}*/ /* */ void (GLAPIENTRYP Rectf)( GLfloat, GLfloat, GLfloat, GLfloat ); /** * \name Array */ /*@{*/ void (GLAPIENTRYP DrawArrays)( GLenum mode, GLint start, GLsizei count ); void (GLAPIENTRYP DrawElements)( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ); void (GLAPIENTRYP DrawRangeElements)( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices ); /*@}*/ /** * \name Eval * * If you don't support eval, fallback to the default vertex format * on receiving an eval call and use the pipeline mechanism to * provide partial T&L acceleration. * * Mesa will provide a set of helper functions to do eval within * accelerated vertex formats, eventually... */ /*@{*/ void (GLAPIENTRYP EvalMesh1)( GLenum mode, GLint i1, GLint i2 ); void (GLAPIENTRYP EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); /*@}*/} GLvertexformat;#endif /* DD_INCLUDED */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -