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