Subversion Repositories Kolibri OS

Rev

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