Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /**
  2.  * \file dd.h
  3.  * Device driver interfaces.
  4.  */
  5.  
  6. /*
  7.  * Mesa 3-D graphics library
  8.  *
  9.  * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
  10.  *
  11.  * Permission is hereby granted, free of charge, to any person obtaining a
  12.  * copy of this software and associated documentation files (the "Software"),
  13.  * to deal in the Software without restriction, including without limitation
  14.  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  15.  * and/or sell copies of the Software, and to permit persons to whom the
  16.  * Software is furnished to do so, subject to the following conditions:
  17.  *
  18.  * The above copyright notice and this permission notice shall be included
  19.  * in all copies or substantial portions of the Software.
  20.  *
  21.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  22.  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  23.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  24.  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  25.  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  26.  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  27.  * OTHER DEALINGS IN THE SOFTWARE.
  28.  */
  29.  
  30.  
  31. #ifndef DD_INCLUDED
  32. #define DD_INCLUDED
  33.  
  34. /* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */
  35.  
  36. #include "glheader.h"
  37.  
  38. struct gl_buffer_object;
  39. struct gl_context;
  40. struct gl_display_list;
  41. struct gl_framebuffer;
  42. struct gl_image_unit;
  43. struct gl_pixelstore_attrib;
  44. struct gl_program;
  45. struct gl_renderbuffer;
  46. struct gl_renderbuffer_attachment;
  47. struct gl_shader;
  48. struct gl_shader_program;
  49. struct gl_texture_image;
  50. struct gl_texture_object;
  51.  
  52. /* GL_ARB_vertex_buffer_object */
  53. /* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return
  54.  * NULL) if buffer is unavailable for immediate mapping.
  55.  *
  56.  * Does GL_MAP_INVALIDATE_RANGE_BIT do this?  It seems so, but it
  57.  * would require more book-keeping in the driver than seems necessary
  58.  * at this point.
  59.  *
  60.  * Does GL_MAP_INVALDIATE_BUFFER_BIT do this?  Not really -- we don't
  61.  * want to provoke the driver to throw away the old storage, we will
  62.  * respect the contents of already referenced data.
  63.  */
  64. #define MESA_MAP_NOWAIT_BIT       0x0040
  65.  
  66.  
  67. /**
  68.  * Device driver function table.
  69.  * Core Mesa uses these function pointers to call into device drivers.
  70.  * Most of these functions directly correspond to OpenGL state commands.
  71.  * Core Mesa will call these functions after error checking has been done
  72.  * so that the drivers don't have to worry about error testing.
  73.  *
  74.  * Vertex transformation/clipping/lighting is patched into the T&L module.
  75.  * Rasterization functions are patched into the swrast module.
  76.  *
  77.  * Note: when new functions are added here, the drivers/common/driverfuncs.c
  78.  * file should be updated too!!!
  79.  */
  80. struct dd_function_table {
  81.    /**
  82.     * Return a string as needed by glGetString().
  83.     * Only the GL_RENDERER query must be implemented.  Otherwise, NULL can be
  84.     * returned.
  85.     */
  86.    const GLubyte * (*GetString)( struct gl_context *ctx, GLenum name );
  87.  
  88.    /**
  89.     * Notify the driver after Mesa has made some internal state changes.  
  90.     *
  91.     * This is in addition to any state change callbacks Mesa may already have
  92.     * made.
  93.     */
  94.    void (*UpdateState)( struct gl_context *ctx, GLbitfield new_state );
  95.  
  96.    /**
  97.     * Resize the given framebuffer to the given size.
  98.     * XXX OBSOLETE: this function will be removed in the future.
  99.     */
  100.    void (*ResizeBuffers)( struct gl_context *ctx, struct gl_framebuffer *fb,
  101.                           GLuint width, GLuint height);
  102.  
  103.    /**
  104.     * This is called whenever glFinish() is called.
  105.     */
  106.    void (*Finish)( struct gl_context *ctx );
  107.  
  108.    /**
  109.     * This is called whenever glFlush() is called.
  110.     */
  111.    void (*Flush)( struct gl_context *ctx );
  112.  
  113.    /**
  114.     * Clear the color/depth/stencil/accum buffer(s).
  115.     * \param buffers  a bitmask of BUFFER_BIT_* flags indicating which
  116.     *                 renderbuffers need to be cleared.
  117.     */
  118.    void (*Clear)( struct gl_context *ctx, GLbitfield buffers );
  119.  
  120.    /**
  121.     * Execute glAccum command.
  122.     */
  123.    void (*Accum)( struct gl_context *ctx, GLenum op, GLfloat value );
  124.  
  125.  
  126.    /**
  127.     * Execute glRasterPos, updating the ctx->Current.Raster fields
  128.     */
  129.    void (*RasterPos)( struct gl_context *ctx, const GLfloat v[4] );
  130.  
  131.    /**
  132.     * \name Image-related functions
  133.     */
  134.    /*@{*/
  135.  
  136.    /**
  137.     * Called by glDrawPixels().
  138.     * \p unpack describes how to unpack the source image data.
  139.     */
  140.    void (*DrawPixels)( struct gl_context *ctx,
  141.                        GLint x, GLint y, GLsizei width, GLsizei height,
  142.                        GLenum format, GLenum type,
  143.                        const struct gl_pixelstore_attrib *unpack,
  144.                        const GLvoid *pixels );
  145.  
  146.    /**
  147.     * Called by glReadPixels().
  148.     */
  149.    void (*ReadPixels)( struct gl_context *ctx,
  150.                        GLint x, GLint y, GLsizei width, GLsizei height,
  151.                        GLenum format, GLenum type,
  152.                        const struct gl_pixelstore_attrib *unpack,
  153.                        GLvoid *dest );
  154.  
  155.    /**
  156.     * Called by glCopyPixels().  
  157.     */
  158.    void (*CopyPixels)( struct gl_context *ctx, GLint srcx, GLint srcy,
  159.                        GLsizei width, GLsizei height,
  160.                        GLint dstx, GLint dsty, GLenum type );
  161.  
  162.    /**
  163.     * Called by glBitmap().  
  164.     */
  165.    void (*Bitmap)( struct gl_context *ctx,
  166.                    GLint x, GLint y, GLsizei width, GLsizei height,
  167.                    const struct gl_pixelstore_attrib *unpack,
  168.                    const GLubyte *bitmap );
  169.    /*@}*/
  170.  
  171.    
  172.    /**
  173.     * \name Texture image functions
  174.     */
  175.    /*@{*/
  176.  
  177.    /**
  178.     * Choose actual hardware texture format given the texture target, the
  179.     * user-provided source image format and type and the desired internal
  180.     * format.  In some cases, srcFormat and srcType can be GL_NONE.
  181.     * Note:  target may be GL_TEXTURE_CUBE_MAP, but never
  182.     * GL_TEXTURE_CUBE_MAP_[POSITIVE/NEGATIVE]_[XYZ].
  183.     * Called by glTexImage(), etc.
  184.     */
  185.    mesa_format (*ChooseTextureFormat)(struct gl_context *ctx,
  186.                                       GLenum target, GLint internalFormat,
  187.                                       GLenum srcFormat, GLenum srcType );
  188.  
  189.    /**
  190.     * Determine sample counts support for a particular target and format
  191.     *
  192.     * \param ctx            GL context
  193.     * \param target         GL target enum
  194.     * \param internalFormat GL format enum
  195.     * \param samples        Buffer to hold the returned sample counts.
  196.     *                       Drivers \b must \b not return more than 16 counts.
  197.     *
  198.     * \returns
  199.     * The number of sample counts actually written to \c samples.  If
  200.     * \c internaFormat is not renderable, zero is returned.
  201.     */
  202.    size_t (*QuerySamplesForFormat)(struct gl_context *ctx,
  203.                                    GLenum target,
  204.                                    GLenum internalFormat,
  205.                                    int samples[16]);
  206.  
  207.    /**
  208.     * Called by glTexImage[123]D() and glCopyTexImage[12]D()
  209.     * Allocate texture memory and copy the user's image to the buffer.
  210.     * The gl_texture_image fields, etc. will be fully initialized.
  211.     * The parameters are the same as glTexImage3D(), plus:
  212.     * \param dims  1, 2, or 3 indicating glTexImage1/2/3D()
  213.     * \param packing describes how to unpack the source data.
  214.     * \param texImage is the destination texture image.
  215.     */
  216.    void (*TexImage)(struct gl_context *ctx, GLuint dims,
  217.                     struct gl_texture_image *texImage,
  218.                     GLenum format, GLenum type, const GLvoid *pixels,
  219.                     const struct gl_pixelstore_attrib *packing);
  220.  
  221.    /**
  222.     * Called by glTexSubImage[123]D().
  223.     * Replace a subset of the target texture with new texel data.
  224.     */
  225.    void (*TexSubImage)(struct gl_context *ctx, GLuint dims,
  226.                        struct gl_texture_image *texImage,
  227.                        GLint xoffset, GLint yoffset, GLint zoffset,
  228.                        GLsizei width, GLsizei height, GLint depth,
  229.                        GLenum format, GLenum type,
  230.                        const GLvoid *pixels,
  231.                        const struct gl_pixelstore_attrib *packing);
  232.  
  233.  
  234.    /**
  235.     * Called by glGetTexImage().
  236.     */
  237.    void (*GetTexImage)( struct gl_context *ctx,
  238.                         GLenum format, GLenum type, GLvoid *pixels,
  239.                         struct gl_texture_image *texImage );
  240.  
  241.    /**
  242.     * Called by glClearTex[Sub]Image
  243.     *
  244.     * Clears a rectangular region of the image to a given value. The
  245.     * clearValue argument is either NULL or points to a single texel to use as
  246.     * the clear value in the same internal format as the texture image. If it
  247.     * is NULL then the texture should be cleared to zeroes.
  248.     */
  249.    void (*ClearTexSubImage)(struct gl_context *ctx,
  250.                             struct gl_texture_image *texImage,
  251.                             GLint xoffset, GLint yoffset, GLint zoffset,
  252.                             GLsizei width, GLsizei height, GLsizei depth,
  253.                             const GLvoid *clearValue);
  254.  
  255.    /**
  256.     * Called by glCopyTex[Sub]Image[123]D().
  257.     *
  258.     * This function should copy a rectangular region in the rb to a single
  259.     * destination slice, specified by @slice.  In the case of 1D array
  260.     * textures (where one GL call can potentially affect multiple destination
  261.     * slices), core mesa takes care of calling this function multiple times,
  262.     * once for each scanline to be copied.
  263.     */
  264.    void (*CopyTexSubImage)(struct gl_context *ctx, GLuint dims,
  265.                            struct gl_texture_image *texImage,
  266.                            GLint xoffset, GLint yoffset, GLint slice,
  267.                            struct gl_renderbuffer *rb,
  268.                            GLint x, GLint y,
  269.                            GLsizei width, GLsizei height);
  270.  
  271.    /**
  272.     * Called by glCopyImageSubData().
  273.     *
  274.     * This function should copy one 2-D slice from srcTexImage to
  275.     * dstTexImage.  If one of the textures is 3-D or is a 1-D or 2-D array
  276.     * texture, this function will be called multiple times: once for each
  277.     * slice.  If one of the textures is a cube map, this function will be
  278.     * called once for each face to be copied.
  279.     */
  280.    void (*CopyImageSubData)(struct gl_context *ctx,
  281.                             struct gl_texture_image *src_image,
  282.                             int src_x, int src_y, int src_z,
  283.                             struct gl_texture_image *dstTexImage,
  284.                             int dst_x, int dst_y, int dst_z,
  285.                             int src_width, int src_height);
  286.  
  287.    /**
  288.     * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
  289.     * Note that if the texture is a cube map, the <target> parameter will
  290.     * indicate which cube face to generate (GL_POSITIVE/NEGATIVE_X/Y/Z).
  291.     * texObj->BaseLevel is the level from which to generate the remaining
  292.     * mipmap levels.
  293.     */
  294.    void (*GenerateMipmap)(struct gl_context *ctx, GLenum target,
  295.                           struct gl_texture_object *texObj);
  296.  
  297.    /**
  298.     * Called by glTexImage, glCompressedTexImage, glCopyTexImage
  299.     * and glTexStorage to check if the dimensions of the texture image
  300.     * are too large.
  301.     * \param target  any GL_PROXY_TEXTURE_x target
  302.     * \return GL_TRUE if the image is OK, GL_FALSE if too large
  303.     */
  304.    GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target,
  305.                                   GLint level, mesa_format format,
  306.                                   GLint width, GLint height,
  307.                                   GLint depth, GLint border);
  308.    /*@}*/
  309.  
  310.    
  311.    /**
  312.     * \name Compressed texture functions
  313.     */
  314.    /*@{*/
  315.  
  316.    /**
  317.     * Called by glCompressedTexImage[123]D().
  318.     */
  319.    void (*CompressedTexImage)(struct gl_context *ctx, GLuint dims,
  320.                               struct gl_texture_image *texImage,
  321.                               GLsizei imageSize, const GLvoid *data);
  322.  
  323.    /**
  324.     * Called by glCompressedTexSubImage[123]D().
  325.     */
  326.    void (*CompressedTexSubImage)(struct gl_context *ctx, GLuint dims,
  327.                                  struct gl_texture_image *texImage,
  328.                                  GLint xoffset, GLint yoffset, GLint zoffset,
  329.                                  GLsizei width, GLint height, GLint depth,
  330.                                  GLenum format,
  331.                                  GLsizei imageSize, const GLvoid *data);
  332.  
  333.    /**
  334.     * Called by glGetCompressedTexImage.
  335.     */
  336.    void (*GetCompressedTexImage)(struct gl_context *ctx,
  337.                                  struct gl_texture_image *texImage,
  338.                                  GLvoid *data);
  339.    /*@}*/
  340.  
  341.    /**
  342.     * \name Texture object / image functions
  343.     */
  344.    /*@{*/
  345.  
  346.    /**
  347.     * Called by glBindTexture() and glBindTextures().
  348.     */
  349.    void (*BindTexture)( struct gl_context *ctx, GLuint texUnit,
  350.                         GLenum target, struct gl_texture_object *tObj );
  351.  
  352.    /**
  353.     * Called to allocate a new texture object.  Drivers will usually
  354.     * allocate/return a subclass of gl_texture_object.
  355.     */
  356.    struct gl_texture_object * (*NewTextureObject)(struct gl_context *ctx,
  357.                                                   GLuint name, GLenum target);
  358.    /**
  359.     * Called to delete/free a texture object.  Drivers should free the
  360.     * object and any image data it contains.
  361.     */
  362.    void (*DeleteTexture)(struct gl_context *ctx,
  363.                          struct gl_texture_object *texObj);
  364.  
  365.    /** Called to allocate a new texture image object. */
  366.    struct gl_texture_image * (*NewTextureImage)(struct gl_context *ctx);
  367.  
  368.    /** Called to free a texture image object returned by NewTextureImage() */
  369.    void (*DeleteTextureImage)(struct gl_context *ctx,
  370.                               struct gl_texture_image *);
  371.  
  372.    /** Called to allocate memory for a single texture image */
  373.    GLboolean (*AllocTextureImageBuffer)(struct gl_context *ctx,
  374.                                         struct gl_texture_image *texImage);
  375.  
  376.    /** Free the memory for a single texture image */
  377.    void (*FreeTextureImageBuffer)(struct gl_context *ctx,
  378.                                   struct gl_texture_image *texImage);
  379.  
  380.    /** Map a slice of a texture image into user space.
  381.     * Note: for GL_TEXTURE_1D_ARRAY, height must be 1, y must be 0 and slice
  382.     * indicates the 1D array index.
  383.     * \param texImage  the texture image
  384.     * \param slice  the 3D image slice or array texture slice
  385.     * \param x, y, w, h  region of interest
  386.     * \param mode  bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
  387.     *              GL_MAP_INVALIDATE_RANGE_BIT (if writing)
  388.     * \param mapOut  returns start of mapping of region of interest
  389.     * \param rowStrideOut returns row stride (in bytes).  In the case of a
  390.     * compressed texture, this is the byte stride between one row of blocks
  391.     * and another.
  392.     */
  393.    void (*MapTextureImage)(struct gl_context *ctx,
  394.                            struct gl_texture_image *texImage,
  395.                            GLuint slice,
  396.                            GLuint x, GLuint y, GLuint w, GLuint h,
  397.                            GLbitfield mode,
  398.                            GLubyte **mapOut, GLint *rowStrideOut);
  399.  
  400.    void (*UnmapTextureImage)(struct gl_context *ctx,
  401.                              struct gl_texture_image *texImage,
  402.                              GLuint slice);
  403.  
  404.    /** For GL_ARB_texture_storage.  Allocate memory for whole mipmap stack.
  405.     * All the gl_texture_images in the texture object will have their
  406.     * dimensions, format, etc. initialized already.
  407.     */
  408.    GLboolean (*AllocTextureStorage)(struct gl_context *ctx,
  409.                                     struct gl_texture_object *texObj,
  410.                                     GLsizei levels, GLsizei width,
  411.                                     GLsizei height, GLsizei depth);
  412.  
  413.    /** Called as part of glTextureView to add views to origTexObj */
  414.    GLboolean (*TextureView)(struct gl_context *ctx,
  415.                             struct gl_texture_object *texObj,
  416.                             struct gl_texture_object *origTexObj);
  417.  
  418.    /** Sets the given buffer object as the texture's storage.  The given
  419.     * texture must have target GL_TEXTURE_1D, GL_TEXTURE_2D,
  420.     * GL_TEXTURE_RECTANGLE, and GL_TEXTURE_2D_ARRAY; have only a single
  421.     * mipmap level; be immutable; and must not have any assigned storage.
  422.     * The format and dimensions of the gl_texture_object will already be
  423.     * initialized.
  424.     *
  425.     * This function is used by the meta PBO texture upload path.
  426.     */
  427.    bool (*SetTextureStorageForBufferObject)(struct gl_context *ctx,
  428.                                             struct gl_texture_object *texObj,
  429.                                             struct gl_buffer_object *bufferObj,
  430.                                             uint32_t buffer_offset,
  431.                                             uint32_t row_stride,
  432.                                             bool read_only);
  433.  
  434.    /**
  435.     * Map a renderbuffer into user space.
  436.     * \param mode  bitmask of GL_MAP_READ_BIT, GL_MAP_WRITE_BIT and
  437.     *              GL_MAP_INVALIDATE_RANGE_BIT (if writing)
  438.     */
  439.    void (*MapRenderbuffer)(struct gl_context *ctx,
  440.                            struct gl_renderbuffer *rb,
  441.                            GLuint x, GLuint y, GLuint w, GLuint h,
  442.                            GLbitfield mode,
  443.                            GLubyte **mapOut, GLint *rowStrideOut);
  444.  
  445.    void (*UnmapRenderbuffer)(struct gl_context *ctx,
  446.                              struct gl_renderbuffer *rb);
  447.  
  448.    /**
  449.     * Optional driver entrypoint that binds a non-texture renderbuffer's
  450.     * contents to a texture image.
  451.     */
  452.    GLboolean (*BindRenderbufferTexImage)(struct gl_context *ctx,
  453.                                          struct gl_renderbuffer *rb,
  454.                                          struct gl_texture_image *texImage);
  455.    /*@}*/
  456.  
  457.  
  458.    /**
  459.     * \name Vertex/fragment program functions
  460.     */
  461.    /*@{*/
  462.    /** Bind a vertex/fragment program */
  463.    void (*BindProgram)(struct gl_context *ctx, GLenum target,
  464.                        struct gl_program *prog);
  465.    /** Allocate a new program */
  466.    struct gl_program * (*NewProgram)(struct gl_context *ctx, GLenum target,
  467.                                      GLuint id);
  468.    /** Delete a program */
  469.    void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog);  
  470.    /**
  471.     * Notify driver that a program string (and GPU code) has been specified
  472.     * or modified.  Return GL_TRUE or GL_FALSE to indicate if the program is
  473.     * supported by the driver.
  474.     */
  475.    GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target,
  476.                                     struct gl_program *prog);
  477.  
  478.    /**
  479.     * Notify driver that the sampler uniforms for the current program have
  480.     * changed.  On some drivers, this may require shader recompiles.
  481.     */
  482.    void (*SamplerUniformChange)(struct gl_context *ctx, GLenum target,
  483.                                 struct gl_program *prog);
  484.  
  485.    /** Query if program can be loaded onto hardware */
  486.    GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target,
  487.                                 struct gl_program *prog);
  488.    
  489.    /*@}*/
  490.  
  491.    /**
  492.     * \name GLSL shader/program functions.
  493.     */
  494.    /*@{*/
  495.    /**
  496.     * Called when a shader program is linked.
  497.     *
  498.     * This gives drivers an opportunity to clone the IR and make their
  499.     * own transformations on it for the purposes of code generation.
  500.     */
  501.    GLboolean (*LinkShader)(struct gl_context *ctx,
  502.                            struct gl_shader_program *shader);
  503.    /*@}*/
  504.  
  505.    /**
  506.     * \name State-changing functions.
  507.     *
  508.     * \note drawing functions are above.
  509.     *
  510.     * These functions are called by their corresponding OpenGL API functions.
  511.     * They are \e also called by the gl_PopAttrib() function!!!
  512.     * May add more functions like these to the device driver in the future.
  513.     */
  514.    /*@{*/
  515.    /** Specify the alpha test function */
  516.    void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref);
  517.    /** Set the blend color */
  518.    void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]);
  519.    /** Set the blend equation */
  520.    void (*BlendEquationSeparate)(struct gl_context *ctx,
  521.                                  GLenum modeRGB, GLenum modeA);
  522.    void (*BlendEquationSeparatei)(struct gl_context *ctx, GLuint buffer,
  523.                                   GLenum modeRGB, GLenum modeA);
  524.    /** Specify pixel arithmetic */
  525.    void (*BlendFuncSeparate)(struct gl_context *ctx,
  526.                              GLenum sfactorRGB, GLenum dfactorRGB,
  527.                              GLenum sfactorA, GLenum dfactorA);
  528.    void (*BlendFuncSeparatei)(struct gl_context *ctx, GLuint buffer,
  529.                               GLenum sfactorRGB, GLenum dfactorRGB,
  530.                               GLenum sfactorA, GLenum dfactorA);
  531.    /** Specify a plane against which all geometry is clipped */
  532.    void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *eq);
  533.    /** Enable and disable writing of frame buffer color components */
  534.    void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask,
  535.                      GLboolean bmask, GLboolean amask );
  536.    void (*ColorMaskIndexed)(struct gl_context *ctx, GLuint buf, GLboolean rmask,
  537.                             GLboolean gmask, GLboolean bmask, GLboolean amask);
  538.    /** Cause a material color to track the current color */
  539.    void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode);
  540.    /** Specify whether front- or back-facing facets can be culled */
  541.    void (*CullFace)(struct gl_context *ctx, GLenum mode);
  542.    /** Define front- and back-facing polygons */
  543.    void (*FrontFace)(struct gl_context *ctx, GLenum mode);
  544.    /** Specify the value used for depth buffer comparisons */
  545.    void (*DepthFunc)(struct gl_context *ctx, GLenum func);
  546.    /** Enable or disable writing into the depth buffer */
  547.    void (*DepthMask)(struct gl_context *ctx, GLboolean flag);
  548.    /** Specify mapping of depth values from NDC to window coordinates */
  549.    void (*DepthRange)(struct gl_context *ctx);
  550.    /** Specify the current buffer for writing */
  551.    void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer );
  552.    /** Specify the buffers for writing for fragment programs*/
  553.    void (*DrawBuffers)(struct gl_context *ctx, GLsizei n, const GLenum *buffers);
  554.    /** Enable or disable server-side gl capabilities */
  555.    void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state);
  556.    /** Specify fog parameters */
  557.    void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params);
  558.    /** Specify implementation-specific hints */
  559.    void (*Hint)(struct gl_context *ctx, GLenum target, GLenum mode);
  560.    /** Set light source parameters.
  561.     * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
  562.     * been transformed to eye-space.
  563.     */
  564.    void (*Lightfv)(struct gl_context *ctx, GLenum light,
  565.                    GLenum pname, const GLfloat *params );
  566.    /** Set the lighting model parameters */
  567.    void (*LightModelfv)(struct gl_context *ctx, GLenum pname,
  568.                         const GLfloat *params);
  569.    /** Specify the line stipple pattern */
  570.    void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern );
  571.    /** Specify the width of rasterized lines */
  572.    void (*LineWidth)(struct gl_context *ctx, GLfloat width);
  573.    /** Specify a logical pixel operation for color index rendering */
  574.    void (*LogicOpcode)(struct gl_context *ctx, GLenum opcode);
  575.    void (*PointParameterfv)(struct gl_context *ctx, GLenum pname,
  576.                             const GLfloat *params);
  577.    /** Specify the diameter of rasterized points */
  578.    void (*PointSize)(struct gl_context *ctx, GLfloat size);
  579.    /** Select a polygon rasterization mode */
  580.    void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode);
  581.    /** Set the scale and units used to calculate depth values */
  582.    void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units, GLfloat clamp);
  583.    /** Set the polygon stippling pattern */
  584.    void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask );
  585.    /* Specifies the current buffer for reading */
  586.    void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer );
  587.    /** Set rasterization mode */
  588.    void (*RenderMode)(struct gl_context *ctx, GLenum mode );
  589.    /** Define the scissor box */
  590.    void (*Scissor)(struct gl_context *ctx);
  591.    /** Select flat or smooth shading */
  592.    void (*ShadeModel)(struct gl_context *ctx, GLenum mode);
  593.    /** OpenGL 2.0 two-sided StencilFunc */
  594.    void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func,
  595.                                GLint ref, GLuint mask);
  596.    /** OpenGL 2.0 two-sided StencilMask */
  597.    void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask);
  598.    /** OpenGL 2.0 two-sided StencilOp */
  599.    void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail,
  600.                              GLenum zfail, GLenum zpass);
  601.    /** Control the generation of texture coordinates */
  602.    void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname,
  603.                   const GLfloat *params);
  604.    /** Set texture environment parameters */
  605.    void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname,
  606.                   const GLfloat *param);
  607.    /** Set texture parameters */
  608.    void (*TexParameter)(struct gl_context *ctx,
  609.                         struct gl_texture_object *texObj,
  610.                         GLenum pname, const GLfloat *params);
  611.    /** Set the viewport */
  612.    void (*Viewport)(struct gl_context *ctx);
  613.    /*@}*/
  614.  
  615.  
  616.    /**
  617.     * \name Vertex/pixel buffer object functions
  618.     */
  619.    /*@{*/
  620.    struct gl_buffer_object * (*NewBufferObject)(struct gl_context *ctx,
  621.                                                 GLuint buffer);
  622.    
  623.    void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj );
  624.  
  625.    GLboolean (*BufferData)(struct gl_context *ctx, GLenum target,
  626.                            GLsizeiptrARB size, const GLvoid *data, GLenum usage,
  627.                            GLenum storageFlags, struct gl_buffer_object *obj);
  628.  
  629.    void (*BufferSubData)( struct gl_context *ctx, GLintptrARB offset,
  630.                           GLsizeiptrARB size, const GLvoid *data,
  631.                           struct gl_buffer_object *obj );
  632.  
  633.    void (*GetBufferSubData)( struct gl_context *ctx,
  634.                              GLintptrARB offset, GLsizeiptrARB size,
  635.                              GLvoid *data, struct gl_buffer_object *obj );
  636.  
  637.    void (*ClearBufferSubData)( struct gl_context *ctx,
  638.                                GLintptr offset, GLsizeiptr size,
  639.                                const GLvoid *clearValue,
  640.                                GLsizeiptr clearValueSize,
  641.                                struct gl_buffer_object *obj );
  642.  
  643.    void (*CopyBufferSubData)( struct gl_context *ctx,
  644.                               struct gl_buffer_object *src,
  645.                               struct gl_buffer_object *dst,
  646.                               GLintptr readOffset, GLintptr writeOffset,
  647.                               GLsizeiptr size );
  648.  
  649.    /* Returns pointer to the start of the mapped range.
  650.     * May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
  651.     */
  652.    void * (*MapBufferRange)( struct gl_context *ctx, GLintptr offset,
  653.                              GLsizeiptr length, GLbitfield access,
  654.                              struct gl_buffer_object *obj,
  655.                              gl_map_buffer_index index);
  656.  
  657.    void (*FlushMappedBufferRange)(struct gl_context *ctx,
  658.                                   GLintptr offset, GLsizeiptr length,
  659.                                   struct gl_buffer_object *obj,
  660.                                   gl_map_buffer_index index);
  661.  
  662.    GLboolean (*UnmapBuffer)( struct gl_context *ctx,
  663.                              struct gl_buffer_object *obj,
  664.                              gl_map_buffer_index index);
  665.    /*@}*/
  666.  
  667.    /**
  668.     * \name Functions for GL_APPLE_object_purgeable
  669.     */
  670.    /*@{*/
  671.    /* variations on ObjectPurgeable */
  672.    GLenum (*BufferObjectPurgeable)(struct gl_context *ctx,
  673.                                    struct gl_buffer_object *obj, GLenum option);
  674.    GLenum (*RenderObjectPurgeable)(struct gl_context *ctx,
  675.                                    struct gl_renderbuffer *obj, GLenum option);
  676.    GLenum (*TextureObjectPurgeable)(struct gl_context *ctx,
  677.                                     struct gl_texture_object *obj,
  678.                                     GLenum option);
  679.  
  680.    /* variations on ObjectUnpurgeable */
  681.    GLenum (*BufferObjectUnpurgeable)(struct gl_context *ctx,
  682.                                      struct gl_buffer_object *obj,
  683.                                      GLenum option);
  684.    GLenum (*RenderObjectUnpurgeable)(struct gl_context *ctx,
  685.                                      struct gl_renderbuffer *obj,
  686.                                      GLenum option);
  687.    GLenum (*TextureObjectUnpurgeable)(struct gl_context *ctx,
  688.                                       struct gl_texture_object *obj,
  689.                                       GLenum option);
  690.    /*@}*/
  691.  
  692.    /**
  693.     * \name Functions for GL_EXT_framebuffer_{object,blit,discard}.
  694.     */
  695.    /*@{*/
  696.    struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx,
  697.                                              GLuint name);
  698.    struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx,
  699.                                                GLuint name);
  700.    void (*BindFramebuffer)(struct gl_context *ctx, GLenum target,
  701.                            struct gl_framebuffer *drawFb,
  702.                            struct gl_framebuffer *readFb);
  703.    void (*FramebufferRenderbuffer)(struct gl_context *ctx,
  704.                                    struct gl_framebuffer *fb,
  705.                                    GLenum attachment,
  706.                                    struct gl_renderbuffer *rb);
  707.    void (*RenderTexture)(struct gl_context *ctx,
  708.                          struct gl_framebuffer *fb,
  709.                          struct gl_renderbuffer_attachment *att);
  710.    void (*FinishRenderTexture)(struct gl_context *ctx,
  711.                                struct gl_renderbuffer *rb);
  712.    void (*ValidateFramebuffer)(struct gl_context *ctx,
  713.                                struct gl_framebuffer *fb);
  714.    /*@}*/
  715.    void (*BlitFramebuffer)(struct gl_context *ctx,
  716.                            struct gl_framebuffer *readFb,
  717.                            struct gl_framebuffer *drawFb,
  718.                            GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
  719.                            GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
  720.                            GLbitfield mask, GLenum filter);
  721.    void (*DiscardFramebuffer)(struct gl_context *ctx,
  722.                               GLenum target, GLsizei numAttachments,
  723.                               const GLenum *attachments);
  724.  
  725.    /**
  726.     * \name Query objects
  727.     */
  728.    /*@{*/
  729.    struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id);
  730.    void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q);
  731.    void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q);
  732.    void (*QueryCounter)(struct gl_context *ctx, struct gl_query_object *q);
  733.    void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q);
  734.    void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q);
  735.    void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q);
  736.    /*@}*/
  737.  
  738.    /**
  739.     * \name Performance monitors
  740.     */
  741.    /*@{*/
  742.    struct gl_perf_monitor_object * (*NewPerfMonitor)(struct gl_context *ctx);
  743.    void (*DeletePerfMonitor)(struct gl_context *ctx,
  744.                              struct gl_perf_monitor_object *m);
  745.    GLboolean (*BeginPerfMonitor)(struct gl_context *ctx,
  746.                                  struct gl_perf_monitor_object *m);
  747.  
  748.    /** Stop an active performance monitor, discarding results. */
  749.    void (*ResetPerfMonitor)(struct gl_context *ctx,
  750.                             struct gl_perf_monitor_object *m);
  751.    void (*EndPerfMonitor)(struct gl_context *ctx,
  752.                           struct gl_perf_monitor_object *m);
  753.    GLboolean (*IsPerfMonitorResultAvailable)(struct gl_context *ctx,
  754.                                              struct gl_perf_monitor_object *m);
  755.    void (*GetPerfMonitorResult)(struct gl_context *ctx,
  756.                                 struct gl_perf_monitor_object *m,
  757.                                 GLsizei dataSize,
  758.                                 GLuint *data,
  759.                                 GLint *bytesWritten);
  760.    /*@}*/
  761.  
  762.  
  763.    /**
  764.     * \name Vertex Array objects
  765.     */
  766.    /*@{*/
  767.    struct gl_vertex_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id);
  768.    void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_vertex_array_object *);
  769.    void (*BindArrayObject)(struct gl_context *ctx, struct gl_vertex_array_object *);
  770.    /*@}*/
  771.  
  772.    /**
  773.     * \name GLSL-related functions (ARB extensions and OpenGL 2.x)
  774.     */
  775.    /*@{*/
  776.    struct gl_shader *(*NewShader)(struct gl_context *ctx,
  777.                                   GLuint name, GLenum type);
  778.    void (*DeleteShader)(struct gl_context *ctx, struct gl_shader *shader);
  779.    struct gl_shader_program *(*NewShaderProgram)(GLuint name);
  780.    void (*DeleteShaderProgram)(struct gl_context *ctx,
  781.                                struct gl_shader_program *shProg);
  782.    void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg);
  783.    /*@}*/
  784.  
  785.  
  786.    /**
  787.     * \name Support for multiple T&L engines
  788.     */
  789.    /*@{*/
  790.  
  791.    /**
  792.     * Set by the driver-supplied T&L engine.  
  793.     *
  794.     * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
  795.     */
  796.    GLuint CurrentExecPrimitive;
  797.  
  798.    /**
  799.     * Current glBegin state of an in-progress compilation.  May be
  800.     * GL_POINTS, GL_TRIANGLE_STRIP, etc. or PRIM_OUTSIDE_BEGIN_END
  801.     * or PRIM_UNKNOWN.
  802.     */
  803.    GLuint CurrentSavePrimitive;
  804.  
  805.  
  806. #define FLUSH_STORED_VERTICES 0x1
  807. #define FLUSH_UPDATE_CURRENT  0x2
  808.    /**
  809.     * Set by the driver-supplied T&L engine whenever vertices are buffered
  810.     * between glBegin()/glEnd() objects or __struct gl_contextRec::Current
  811.     * is not updated.  A bitmask of the FLUSH_x values above.
  812.     *
  813.     * The dd_function_table::FlushVertices call below may be used to resolve
  814.     * these conditions.
  815.     */
  816.    GLbitfield NeedFlush;
  817.  
  818.    /** Need to call SaveFlushVertices() upon state change? */
  819.    GLboolean SaveNeedFlush;
  820.  
  821.    /* Called prior to any of the GLvertexformat functions being
  822.     * called.  Paired with Driver.FlushVertices().
  823.     */
  824.    void (*BeginVertices)( struct gl_context *ctx );
  825.  
  826.    /**
  827.     * If inside glBegin()/glEnd(), it should assert(0).  Otherwise, if
  828.     * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
  829.     * vertices, if FLUSH_UPDATE_CURRENT bit is set updates
  830.     * __struct gl_contextRec::Current and gl_light_attrib::Material
  831.     *
  832.     * Note that the default T&L engine never clears the
  833.     * FLUSH_UPDATE_CURRENT bit, even after performing the update.
  834.     */
  835.    void (*FlushVertices)( struct gl_context *ctx, GLuint flags );
  836.    void (*SaveFlushVertices)( struct gl_context *ctx );
  837.  
  838.    /**
  839.     * Give the driver the opportunity to hook in its own vtxfmt for
  840.     * compiling optimized display lists.  This is called on each valid
  841.     * glBegin() during list compilation.
  842.     */
  843.    GLboolean (*NotifySaveBegin)( struct gl_context *ctx, GLenum mode );
  844.  
  845.    /**
  846.     * Notify driver that the special derived value _NeedEyeCoords has
  847.     * changed.
  848.     */
  849.    void (*LightingSpaceChange)( struct gl_context *ctx );
  850.  
  851.    /**
  852.     * Called by glNewList().
  853.     *
  854.     * Let the T&L component know what is going on with display lists
  855.     * in time to make changes to dispatch tables, etc.
  856.     */
  857.    void (*NewList)( struct gl_context *ctx, GLuint list, GLenum mode );
  858.    /**
  859.     * Called by glEndList().
  860.     *
  861.     * \sa dd_function_table::NewList.
  862.     */
  863.    void (*EndList)( struct gl_context *ctx );
  864.  
  865.    /**
  866.     * Called by glCallList(s).
  867.     *
  868.     * Notify the T&L component before and after calling a display list.
  869.     */
  870.    void (*BeginCallList)( struct gl_context *ctx,
  871.                           struct gl_display_list *dlist );
  872.    /**
  873.     * Called by glEndCallList().
  874.     *
  875.     * \sa dd_function_table::BeginCallList.
  876.     */
  877.    void (*EndCallList)( struct gl_context *ctx );
  878.  
  879.    /**@}*/
  880.  
  881.    /**
  882.     * \name GL_ARB_sync interfaces
  883.     */
  884.    /*@{*/
  885.    struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum);
  886.    void (*FenceSync)(struct gl_context *, struct gl_sync_object *,
  887.                      GLenum, GLbitfield);
  888.    void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *);
  889.    void (*CheckSync)(struct gl_context *, struct gl_sync_object *);
  890.    void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *,
  891.                           GLbitfield, GLuint64);
  892.    void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *,
  893.                           GLbitfield, GLuint64);
  894.    /*@}*/
  895.  
  896.    /** GL_NV_conditional_render */
  897.    void (*BeginConditionalRender)(struct gl_context *ctx,
  898.                                   struct gl_query_object *q,
  899.                                   GLenum mode);
  900.    void (*EndConditionalRender)(struct gl_context *ctx,
  901.                                 struct gl_query_object *q);
  902.  
  903.    /**
  904.     * \name GL_OES_draw_texture interface
  905.     */
  906.    /*@{*/
  907.    void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
  908.                    GLfloat width, GLfloat height);
  909.    /*@}*/
  910.  
  911.    /**
  912.     * \name GL_OES_EGL_image interface
  913.     */
  914.    void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target,
  915.                                    struct gl_texture_object *texObj,
  916.                                    struct gl_texture_image *texImage,
  917.                                    GLeglImageOES image_handle);
  918.    void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx,
  919.                                              struct gl_renderbuffer *rb,
  920.                                              void *image_handle);
  921.  
  922.    /**
  923.     * \name GL_EXT_transform_feedback interface
  924.     */
  925.    struct gl_transform_feedback_object *
  926.         (*NewTransformFeedback)(struct gl_context *ctx, GLuint name);
  927.    void (*DeleteTransformFeedback)(struct gl_context *ctx,
  928.                                    struct gl_transform_feedback_object *obj);
  929.    void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode,
  930.                                   struct gl_transform_feedback_object *obj);
  931.    void (*EndTransformFeedback)(struct gl_context *ctx,
  932.                                 struct gl_transform_feedback_object *obj);
  933.    void (*PauseTransformFeedback)(struct gl_context *ctx,
  934.                                   struct gl_transform_feedback_object *obj);
  935.    void (*ResumeTransformFeedback)(struct gl_context *ctx,
  936.                                    struct gl_transform_feedback_object *obj);
  937.  
  938.    /**
  939.     * Return the number of vertices written to a stream during the last
  940.     * Begin/EndTransformFeedback block.
  941.     */
  942.    GLsizei (*GetTransformFeedbackVertexCount)(struct gl_context *ctx,
  943.                                        struct gl_transform_feedback_object *obj,
  944.                                        GLuint stream);
  945.  
  946.    /**
  947.     * \name GL_NV_texture_barrier interface
  948.     */
  949.    void (*TextureBarrier)(struct gl_context *ctx);
  950.  
  951.    /**
  952.     * \name GL_ARB_sampler_objects
  953.     */
  954.    struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx,
  955.                                                   GLuint name);
  956.    void (*DeleteSamplerObject)(struct gl_context *ctx,
  957.                                struct gl_sampler_object *samp);
  958.  
  959.    /**
  960.     * \name Return a timestamp in nanoseconds as defined by GL_ARB_timer_query.
  961.     * This should be equivalent to glGetInteger64v(GL_TIMESTAMP);
  962.     */
  963.    uint64_t (*GetTimestamp)(struct gl_context *ctx);
  964.  
  965.    /**
  966.     * \name GL_ARB_texture_multisample
  967.     */
  968.    void (*GetSamplePosition)(struct gl_context *ctx,
  969.                              struct gl_framebuffer *fb,
  970.                              GLuint index,
  971.                              GLfloat *outValue);
  972.  
  973.    /**
  974.     * \name NV_vdpau_interop interface
  975.     */
  976.    void (*VDPAUMapSurface)(struct gl_context *ctx, GLenum target,
  977.                            GLenum access, GLboolean output,
  978.                            struct gl_texture_object *texObj,
  979.                            struct gl_texture_image *texImage,
  980.                            const GLvoid *vdpSurface, GLuint index);
  981.    void (*VDPAUUnmapSurface)(struct gl_context *ctx, GLenum target,
  982.                              GLenum access, GLboolean output,
  983.                              struct gl_texture_object *texObj,
  984.                              struct gl_texture_image *texImage,
  985.                              const GLvoid *vdpSurface, GLuint index);
  986.  
  987.    /**
  988.     * Query reset status for GL_ARB_robustness
  989.     *
  990.     * Per \c glGetGraphicsResetStatusARB, this function should return a
  991.     * non-zero value once after a reset.  If a reset is non-atomic, the
  992.     * non-zero status should be returned for the duration of the reset.
  993.     */
  994.    GLenum (*GetGraphicsResetStatus)(struct gl_context *ctx);
  995.  
  996.    /**
  997.     * \name GL_ARB_shader_image_load_store interface.
  998.     */
  999.    /** @{ */
  1000.    void (*BindImageTexture)(struct gl_context *ctx,
  1001.                             struct gl_image_unit *unit,
  1002.                             struct gl_texture_object *texObj,
  1003.                             GLint level, GLboolean layered, GLint layer,
  1004.                             GLenum access, GLenum format);
  1005.  
  1006.    void (*MemoryBarrier)(struct gl_context *ctx, GLbitfield barriers);
  1007.    /** @} */
  1008.  
  1009.    /**
  1010.     * \name GL_ARB_compute_shader interface
  1011.     */
  1012.    /*@{*/
  1013.    void (*DispatchCompute)(struct gl_context *ctx, const GLuint *num_groups);
  1014.    /*@}*/
  1015. };
  1016.  
  1017.  
  1018. /**
  1019.  * Per-vertex functions.
  1020.  *
  1021.  * These are the functions which can appear between glBegin and glEnd.
  1022.  * Depending on whether we're inside or outside a glBegin/End pair
  1023.  * and whether we're in immediate mode or building a display list, these
  1024.  * functions behave differently.  This structure allows us to switch
  1025.  * between those modes more easily.
  1026.  *
  1027.  * Generally, these pointers point to functions in the VBO module.
  1028.  */
  1029. typedef struct {
  1030.    void (GLAPIENTRYP ArrayElement)( GLint );
  1031.    void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat );
  1032.    void (GLAPIENTRYP Color3fv)( const GLfloat * );
  1033.    void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat );
  1034.    void (GLAPIENTRYP Color4fv)( const GLfloat * );
  1035.    void (GLAPIENTRYP EdgeFlag)( GLboolean );
  1036.    void (GLAPIENTRYP EvalCoord1f)( GLfloat );
  1037.    void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * );
  1038.    void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat );
  1039.    void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * );
  1040.    void (GLAPIENTRYP EvalPoint1)( GLint );
  1041.    void (GLAPIENTRYP EvalPoint2)( GLint, GLint );
  1042.    void (GLAPIENTRYP FogCoordfEXT)( GLfloat );
  1043.    void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * );
  1044.    void (GLAPIENTRYP Indexf)( GLfloat );
  1045.    void (GLAPIENTRYP Indexfv)( const GLfloat * );
  1046.    void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * );
  1047.    void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat );
  1048.    void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * );
  1049.    void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat );
  1050.    void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * );
  1051.    void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat );
  1052.    void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * );
  1053.    void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat );
  1054.    void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * );
  1055.    void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat );
  1056.    void (GLAPIENTRYP Normal3fv)( const GLfloat * );
  1057.    void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat );
  1058.    void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * );
  1059.    void (GLAPIENTRYP TexCoord1f)( GLfloat );
  1060.    void (GLAPIENTRYP TexCoord1fv)( const GLfloat * );
  1061.    void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat );
  1062.    void (GLAPIENTRYP TexCoord2fv)( const GLfloat * );
  1063.    void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat );
  1064.    void (GLAPIENTRYP TexCoord3fv)( const GLfloat * );
  1065.    void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat );
  1066.    void (GLAPIENTRYP TexCoord4fv)( const GLfloat * );
  1067.    void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat );
  1068.    void (GLAPIENTRYP Vertex2fv)( const GLfloat * );
  1069.    void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat );
  1070.    void (GLAPIENTRYP Vertex3fv)( const GLfloat * );
  1071.    void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat );
  1072.    void (GLAPIENTRYP Vertex4fv)( const GLfloat * );
  1073.    void (GLAPIENTRYP CallList)( GLuint );
  1074.    void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * );
  1075.    void (GLAPIENTRYP Begin)( GLenum );
  1076.    void (GLAPIENTRYP End)( void );
  1077.    void (GLAPIENTRYP PrimitiveRestartNV)( void );
  1078.    /* Originally for GL_NV_vertex_program, now used only dlist.c and friends */
  1079.    void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x );
  1080.    void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v );
  1081.    void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y );
  1082.    void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v );
  1083.    void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
  1084.    void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v );
  1085.    void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
  1086.    void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v );
  1087.    /* GL_ARB_vertex_program */
  1088.    void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x );
  1089.    void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v );
  1090.    void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y );
  1091.    void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v );
  1092.    void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
  1093.    void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v );
  1094.    void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
  1095.    void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v );
  1096.  
  1097.    /* GL_EXT_gpu_shader4 / GL 3.0 */
  1098.    void (GLAPIENTRYP VertexAttribI1i)( GLuint index, GLint x);
  1099.    void (GLAPIENTRYP VertexAttribI2i)( GLuint index, GLint x, GLint y);
  1100.    void (GLAPIENTRYP VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z);
  1101.    void (GLAPIENTRYP VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w);
  1102.    void (GLAPIENTRYP VertexAttribI2iv)( GLuint index, const GLint *v);
  1103.    void (GLAPIENTRYP VertexAttribI3iv)( GLuint index, const GLint *v);
  1104.    void (GLAPIENTRYP VertexAttribI4iv)( GLuint index, const GLint *v);
  1105.  
  1106.    void (GLAPIENTRYP VertexAttribI1ui)( GLuint index, GLuint x);
  1107.    void (GLAPIENTRYP VertexAttribI2ui)( GLuint index, GLuint x, GLuint y);
  1108.    void (GLAPIENTRYP VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z);
  1109.    void (GLAPIENTRYP VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
  1110.    void (GLAPIENTRYP VertexAttribI2uiv)( GLuint index, const GLuint *v);
  1111.    void (GLAPIENTRYP VertexAttribI3uiv)( GLuint index, const GLuint *v);
  1112.    void (GLAPIENTRYP VertexAttribI4uiv)( GLuint index, const GLuint *v);
  1113.  
  1114.    /* GL_ARB_vertex_type_10_10_10_2_rev / GL3.3 */
  1115.    void (GLAPIENTRYP VertexP2ui)( GLenum type, GLuint value );
  1116.    void (GLAPIENTRYP VertexP2uiv)( GLenum type, const GLuint *value);
  1117.  
  1118.    void (GLAPIENTRYP VertexP3ui)( GLenum type, GLuint value );
  1119.    void (GLAPIENTRYP VertexP3uiv)( GLenum type, const GLuint *value);
  1120.  
  1121.    void (GLAPIENTRYP VertexP4ui)( GLenum type, GLuint value );
  1122.    void (GLAPIENTRYP VertexP4uiv)( GLenum type, const GLuint *value);
  1123.  
  1124.    void (GLAPIENTRYP TexCoordP1ui)( GLenum type, GLuint coords );
  1125.    void (GLAPIENTRYP TexCoordP1uiv)( GLenum type, const GLuint *coords );
  1126.  
  1127.    void (GLAPIENTRYP TexCoordP2ui)( GLenum type, GLuint coords );
  1128.    void (GLAPIENTRYP TexCoordP2uiv)( GLenum type, const GLuint *coords );
  1129.  
  1130.    void (GLAPIENTRYP TexCoordP3ui)( GLenum type, GLuint coords );
  1131.    void (GLAPIENTRYP TexCoordP3uiv)( GLenum type, const GLuint *coords );
  1132.  
  1133.    void (GLAPIENTRYP TexCoordP4ui)( GLenum type, GLuint coords );
  1134.    void (GLAPIENTRYP TexCoordP4uiv)( GLenum type, const GLuint *coords );
  1135.  
  1136.    void (GLAPIENTRYP MultiTexCoordP1ui)( GLenum texture, GLenum type, GLuint coords );
  1137.    void (GLAPIENTRYP MultiTexCoordP1uiv)( GLenum texture, GLenum type, const GLuint *coords );
  1138.    void (GLAPIENTRYP MultiTexCoordP2ui)( GLenum texture, GLenum type, GLuint coords );
  1139.    void (GLAPIENTRYP MultiTexCoordP2uiv)( GLenum texture, GLenum type, const GLuint *coords );
  1140.    void (GLAPIENTRYP MultiTexCoordP3ui)( GLenum texture, GLenum type, GLuint coords );
  1141.    void (GLAPIENTRYP MultiTexCoordP3uiv)( GLenum texture, GLenum type, const GLuint *coords );
  1142.    void (GLAPIENTRYP MultiTexCoordP4ui)( GLenum texture, GLenum type, GLuint coords );
  1143.    void (GLAPIENTRYP MultiTexCoordP4uiv)( GLenum texture, GLenum type, const GLuint *coords );
  1144.  
  1145.    void (GLAPIENTRYP NormalP3ui)( GLenum type, GLuint coords );
  1146.    void (GLAPIENTRYP NormalP3uiv)( GLenum type, const GLuint *coords );
  1147.  
  1148.    void (GLAPIENTRYP ColorP3ui)( GLenum type, GLuint color );
  1149.    void (GLAPIENTRYP ColorP3uiv)( GLenum type, const GLuint *color );
  1150.  
  1151.    void (GLAPIENTRYP ColorP4ui)( GLenum type, GLuint color );
  1152.    void (GLAPIENTRYP ColorP4uiv)( GLenum type, const GLuint *color );
  1153.  
  1154.    void (GLAPIENTRYP SecondaryColorP3ui)( GLenum type, GLuint color );
  1155.    void (GLAPIENTRYP SecondaryColorP3uiv)( GLenum type, const GLuint *color );
  1156.  
  1157.    void (GLAPIENTRYP VertexAttribP1ui)( GLuint index, GLenum type,
  1158.                                         GLboolean normalized, GLuint value);
  1159.    void (GLAPIENTRYP VertexAttribP2ui)( GLuint index, GLenum type,
  1160.                                         GLboolean normalized, GLuint value);
  1161.    void (GLAPIENTRYP VertexAttribP3ui)( GLuint index, GLenum type,
  1162.                                         GLboolean normalized, GLuint value);
  1163.    void (GLAPIENTRYP VertexAttribP4ui)( GLuint index, GLenum type,
  1164.                                         GLboolean normalized, GLuint value);
  1165.    void (GLAPIENTRYP VertexAttribP1uiv)( GLuint index, GLenum type,
  1166.                                         GLboolean normalized,
  1167.                                          const GLuint *value);
  1168.    void (GLAPIENTRYP VertexAttribP2uiv)( GLuint index, GLenum type,
  1169.                                         GLboolean normalized,
  1170.                                          const GLuint *value);
  1171.    void (GLAPIENTRYP VertexAttribP3uiv)( GLuint index, GLenum type,
  1172.                                         GLboolean normalized,
  1173.                                          const GLuint *value);
  1174.    void (GLAPIENTRYP VertexAttribP4uiv)( GLuint index, GLenum type,
  1175.                                          GLboolean normalized,
  1176.                                          const GLuint *value);
  1177.  
  1178.    /* GL_ARB_vertex_attrib_64bit / GL 4.1 */
  1179.    void (GLAPIENTRYP VertexAttribL1d)( GLuint index, GLdouble x);
  1180.    void (GLAPIENTRYP VertexAttribL2d)( GLuint index, GLdouble x, GLdouble y);
  1181.    void (GLAPIENTRYP VertexAttribL3d)( GLuint index, GLdouble x, GLdouble y, GLdouble z);
  1182.    void (GLAPIENTRYP VertexAttribL4d)( GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
  1183.  
  1184.  
  1185.    void (GLAPIENTRYP VertexAttribL1dv)( GLuint index, const GLdouble *v);
  1186.    void (GLAPIENTRYP VertexAttribL2dv)( GLuint index, const GLdouble *v);
  1187.    void (GLAPIENTRYP VertexAttribL3dv)( GLuint index, const GLdouble *v);
  1188.    void (GLAPIENTRYP VertexAttribL4dv)( GLuint index, const GLdouble *v);
  1189.  
  1190. } GLvertexformat;
  1191.  
  1192.  
  1193. #endif /* DD_INCLUDED */
  1194.