📄 dd.h
字号:
* * \sa dd_function_table::CompressedTexImage1D. */ void (*CompressedTexImage2D)( GLcontext *ctx, GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data, struct gl_texture_object *texObj, struct gl_texture_image *texImage ); /** * Called by glCompressedTexImage3D(). * * \sa dd_function_table::CompressedTexImage3D. */ void (*CompressedTexImage3D)( GLcontext *ctx, GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data, struct gl_texture_object *texObj, struct gl_texture_image *texImage ); /** * Called by glCompressedTexSubImage1D(). * * \param target user specified. * \param level user specified. * \param xoffset user specified. * \param yoffset user specified. * \param zoffset user specified. * \param width user specified. * \param height user specified. * \param depth user specified. * \param imageSize user specified. * \param data user specified. * \param texObj is the target texture object. * \param texImage is the target texture image. It will have the texture \p * width, \p height, \p depth, \p border and \p internalFormat information. */ void (*CompressedTexSubImage1D)(GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data, struct gl_texture_object *texObj, struct gl_texture_image *texImage); /** * Called by glCompressedTexSubImage2D(). * * \sa dd_function_table::CompressedTexImage3D. */ void (*CompressedTexSubImage2D)(GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLint height, GLenum format, GLsizei imageSize, const GLvoid *data, struct gl_texture_object *texObj, struct gl_texture_image *texImage); /** * Called by glCompressedTexSubImage3D(). * * \sa dd_function_table::CompressedTexImage3D. */ void (*CompressedTexSubImage3D)(GLcontext *ctx, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLint height, GLint depth, GLenum format, GLsizei imageSize, const GLvoid *data, struct gl_texture_object *texObj, struct gl_texture_image *texImage); /** * Called by glGetCompressedTexImage. */ void (*GetCompressedTexImage)(GLcontext *ctx, GLenum target, GLint level, GLvoid *img, struct gl_texture_object *texObj, struct gl_texture_image *texImage); /** * Called to query number of bytes of storage needed to store the * specified compressed texture. */ GLuint (*CompressedTextureSize)( GLcontext *ctx, GLsizei width, GLsizei height, GLsizei depth, GLenum format ); /*@}*/ /** * \name Texture object functions */ /*@{*/ /** * Called by glBindTexture(). */ void (*BindTexture)( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj ); /** * Called to allocate a new texture object. * A new gl_texture_object should be returned. The driver should * attach to it any device-specific info it needs. */ struct gl_texture_object * (*NewTextureObject)( GLcontext *ctx, GLuint name, GLenum target ); /** * Called when a texture object is about to be deallocated. * * Driver should delete the gl_texture_object object and anything * hanging off of it. */ void (*DeleteTexture)( GLcontext *ctx, struct gl_texture_object *tObj ); /** * Called to allocate a new texture image object. */ struct gl_texture_image * (*NewTextureImage)( GLcontext *ctx ); /** * Called to free tImage->Data. */ void (*FreeTexImageData)( GLcontext *ctx, struct gl_texture_image *tImage ); /** Map texture image data into user space */ void (*MapTexture)( GLcontext *ctx, struct gl_texture_object *tObj ); /** Unmap texture images from user space */ void (*UnmapTexture)( GLcontext *ctx, struct gl_texture_object *tObj ); /** * 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(). */ GLboolean (*IsTextureResident)( GLcontext *ctx, struct gl_texture_object *t ); /** * Called by glPrioritizeTextures(). */ void (*PrioritizeTexture)( GLcontext *ctx, struct gl_texture_object *t, GLclampf priority ); /** * Called by glActiveTextureARB() to set current texture unit. */ void (*ActiveTexture)( GLcontext *ctx, GLuint texUnitNumber ); /** * Called when the texture's color lookup table is changed. * * If \p tObj is NULL then the shared texture palette * gl_texture_object::Palette is to be updated. */ void (*UpdateTexturePalette)( GLcontext *ctx, struct gl_texture_object *tObj ); /*@}*/ /** * \name Imaging functionality */ /*@{*/ void (*CopyColorTable)( GLcontext *ctx, GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width ); void (*CopyColorSubTable)( GLcontext *ctx, GLenum target, GLsizei start, GLint x, GLint y, GLsizei width ); void (*CopyConvolutionFilter1D)( GLcontext *ctx, GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width ); void (*CopyConvolutionFilter2D)( GLcontext *ctx, GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height ); /*@}*/ /** * \name Vertex/fragment program functions */ /*@{*/ /** Bind a vertex/fragment program */ void (*BindProgram)(GLcontext *ctx, GLenum target, struct gl_program *prog); /** Allocate a new program */ struct gl_program * (*NewProgram)(GLcontext *ctx, GLenum target, GLuint id); /** Delete a program */ void (*DeleteProgram)(GLcontext *ctx, struct gl_program *prog); /** Notify driver that a program string has been specified. */ void (*ProgramStringNotify)(GLcontext *ctx, GLenum target, struct gl_program *prog); /** Get value of a program register during program execution. */ void (*GetProgramRegister)(GLcontext *ctx, enum register_file file, GLuint index, GLfloat val[4]); /** Query if program can be loaded onto hardware */ GLboolean (*IsProgramNative)(GLcontext *ctx, GLenum target, struct gl_program *prog); /*@}*/ /** * \name State-changing functions. * * \note drawing functions are above. * * These functions are called by their corresponding OpenGL API functions. * They are \e also called by the gl_PopAttrib() function!!! * May add more functions like these to the device driver in the future. */ /*@{*/ /** Specify the alpha test function */ void (*AlphaFunc)(GLcontext *ctx, GLenum func, GLfloat ref); /** Set the blend color */ void (*BlendColor)(GLcontext *ctx, const GLfloat color[4]); /** Set the blend equation */ void (*BlendEquationSeparate)(GLcontext *ctx, GLenum modeRGB, GLenum modeA); /** Specify pixel arithmetic */ void (*BlendFuncSeparate)(GLcontext *ctx, GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA); /** Specify clear values for the color buffers */ void (*ClearColor)(GLcontext *ctx, const GLfloat color[4]); /** Specify the clear value for the depth buffer */ void (*ClearDepth)(GLcontext *ctx, GLclampd d); /** Specify the clear value for the color index buffers */ void (*ClearIndex)(GLcontext *ctx, GLuint index); /** Specify the clear value for the stencil buffer */ void (*ClearStencil)(GLcontext *ctx, GLint s); /** Specify a plane against which all geometry is clipped */ void (*ClipPlane)(GLcontext *ctx, GLenum plane, const GLfloat *equation ); /** Enable and disable writing of frame buffer color components */ void (*ColorMask)(GLcontext *ctx, GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask ); /** Cause a material color to track the current color */ void (*ColorMaterial)(GLcontext *ctx, GLenum face, GLenum mode); /** Specify whether front- or back-facing facets can be culled */ void (*CullFace)(GLcontext *ctx, GLenum mode); /** Define front- and back-facing polygons */ void (*FrontFace)(GLcontext *ctx, GLenum mode); /** Specify the value used for depth buffer comparisons */ void (*DepthFunc)(GLcontext *ctx, GLenum func); /** Enable or disable writing into the depth buffer */ void (*DepthMask)(GLcontext *ctx, GLboolean flag); /** Specify mapping of depth values from NDC to window coordinates */ 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 (*Fogfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); /** Specify implementation-specific hints */ void (*Hint)(GLcontext *ctx, GLenum target, GLenum mode); /** Control the writing of individual bits in the color index buffers */ void (*IndexMask)(GLcontext *ctx, GLuint mask); /** Set light source parameters. * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already * been transformed to eye-space. */ void (*Lightfv)(GLcontext *ctx, GLenum light, GLenum pname, const GLfloat *params ); /** Set the lighting model parameters */ void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); /** Specify the line stipple pattern */ void (*LineStipple)(GLcontext *ctx, GLint factor, GLushort pattern ); /** Specify the width of rasterized lines */ void (*LineWidth)(GLcontext *ctx, GLfloat width); /** Specify a logical pixel operation for color index rendering */ void (*LogicOpcode)(GLcontext *ctx, GLenum opcode); void (*PointParameterfv)(GLcontext *ctx, GLenum pname, const GLfloat *params); /** Specify the diameter of rasterized points */ void (*PointSize)(GLcontext *ctx, GLfloat size); /** Select a polygon rasterization mode */ void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode); /** Set the scale and units used to calculate depth values */ void (*PolygonOffset)(GLcontext *ctx, GLfloat factor, GLfloat units); /** Set the polygon stippling pattern */ void (*PolygonStipple)(GLcontext *ctx, const GLubyte *mask ); /* Specifies the current buffer for reading */ void (*ReadBuffer)( GLcontext *ctx, GLenum buffer ); /** Set rasterization mode */ void (*RenderMode)(GLcontext *ctx, GLenum mode ); /** Define the scissor box */ void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); /** Select flat or smooth shading */ void (*ShadeModel)(GLcontext *ctx, GLenum mode); /** 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); /** Set texture environment parameters */ void (*TexEnv)(GLcontext *ctx, GLenum target, GLenum pname, const GLfloat *param); /** Set texture parameters */ void (*TexParameter)(GLcontext *ctx, GLenum target, struct gl_texture_object *texObj, GLenum pname, const GLfloat *params); void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat); /** Set the viewport */ void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h); /*@}*/ /** * \name Vertex array functions * * Called by the corresponding OpenGL functions. */ /*@{*/ void (*VertexPointer)(GLcontext *ctx, GLint size, GLenum type, GLsizei stride, const GLvoid *ptr); void (*NormalPointer)(GLcontext *ctx, GLenum type, GLsizei stride, const GLvoid *ptr); void (*ColorPointer)(GLcontext *ctx, GLint size, GLenum type, GLsizei stride, const GLvoid *ptr); void (*FogCoordPointer)(GLcontext *ctx, GLenum type, GLsizei stride, const GLvoid *ptr); void (*IndexPointer)(GLcontext *ctx, GLenum type, GLsizei stride, const GLvoid *ptr); void (*SecondaryColorPointer)(GLcontext *ctx, GLint size, GLenum type, GLsizei stride, const GLvoid *ptr); void (*TexCoordPointer)(GLcontext *ctx, GLint size, GLenum type, GLsizei stride, const GLvoid *ptr); void (*EdgeFlagPointer)(GLcontext *ctx, GLsizei stride, const GLvoid *ptr); void (*VertexAttribPointer)(GLcontext *ctx, GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *ptr); void (*LockArraysEXT)( GLcontext *ctx, GLint first, GLsizei count ); void (*UnlockArraysEXT)( GLcontext *ctx ); /*@}*/ /** * \name State-query functions * * Return GL_TRUE if query was completed, GL_FALSE otherwise. */ /*@{*/ /** Return the value or values of a selected parameter */ GLboolean (*GetBooleanv)(GLcontext *ctx, GLenum pname, GLboolean *result); /** Return the value or values of a selected parameter */ GLboolean (*GetDoublev)(GLcontext *ctx, GLenum pname, GLdouble *result); /** Return the value or values of a selected parameter */ GLboolean (*GetFloatv)(GLcontext *ctx, GLenum pname, GLfloat *result); /** Return the value or values of a selected parameter */ GLboolean (*GetIntegerv)(GLcontext *ctx, GLenum pname, GLint *result); /** Return the value or values of a selected parameter */ GLboolean (*GetPointerv)(GLcontext *ctx, GLenum pname, GLvoid **result); /*@}*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -