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