mesa: remove some Driver.Blend* hooks
[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 void (*ColorMaskIndexed)(struct gl_context *ctx, GLuint buf, GLboolean rmask,
529 GLboolean gmask, GLboolean bmask, GLboolean amask);
530 /** Cause a material color to track the current color */
531 void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode);
532 /** Specify whether front- or back-facing facets can be culled */
533 void (*CullFace)(struct gl_context *ctx, GLenum mode);
534 /** Define front- and back-facing polygons */
535 void (*FrontFace)(struct gl_context *ctx, GLenum mode);
536 /** Specify the value used for depth buffer comparisons */
537 void (*DepthFunc)(struct gl_context *ctx, GLenum func);
538 /** Enable or disable writing into the depth buffer */
539 void (*DepthMask)(struct gl_context *ctx, GLboolean flag);
540 /** Specify mapping of depth values from NDC to window coordinates */
541 void (*DepthRange)(struct gl_context *ctx);
542 /** Specify the current buffer for writing */
543 void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer );
544 /** Specify the buffers for writing for fragment programs*/
545 void (*DrawBuffers)(struct gl_context *ctx, GLsizei n, const GLenum *buffers);
546 /** Enable or disable server-side gl capabilities */
547 void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state);
548 /** Specify fog parameters */
549 void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params);
550 /** Specify implementation-specific hints */
551 void (*Hint)(struct gl_context *ctx, GLenum target, GLenum mode);
552 /** Set light source parameters.
553 * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
554 * been transformed to eye-space.
555 */
556 void (*Lightfv)(struct gl_context *ctx, GLenum light,
557 GLenum pname, const GLfloat *params );
558 /** Set the lighting model parameters */
559 void (*LightModelfv)(struct gl_context *ctx, GLenum pname,
560 const GLfloat *params);
561 /** Specify the line stipple pattern */
562 void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern );
563 /** Specify the width of rasterized lines */
564 void (*LineWidth)(struct gl_context *ctx, GLfloat width);
565 /** Specify a logical pixel operation for color index rendering */
566 void (*LogicOpcode)(struct gl_context *ctx, GLenum opcode);
567 void (*PointParameterfv)(struct gl_context *ctx, GLenum pname,
568 const GLfloat *params);
569 /** Specify the diameter of rasterized points */
570 void (*PointSize)(struct gl_context *ctx, GLfloat size);
571 /** Select a polygon rasterization mode */
572 void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode);
573 /** Set the scale and units used to calculate depth values */
574 void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units, GLfloat clamp);
575 /** Set the polygon stippling pattern */
576 void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask );
577 /* Specifies the current buffer for reading */
578 void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer );
579 /** Set rasterization mode */
580 void (*RenderMode)(struct gl_context *ctx, GLenum mode );
581 /** Define the scissor box */
582 void (*Scissor)(struct gl_context *ctx);
583 /** Select flat or smooth shading */
584 void (*ShadeModel)(struct gl_context *ctx, GLenum mode);
585 /** OpenGL 2.0 two-sided StencilFunc */
586 void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func,
587 GLint ref, GLuint mask);
588 /** OpenGL 2.0 two-sided StencilMask */
589 void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask);
590 /** OpenGL 2.0 two-sided StencilOp */
591 void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail,
592 GLenum zfail, GLenum zpass);
593 /** Control the generation of texture coordinates */
594 void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname,
595 const GLfloat *params);
596 /** Set texture environment parameters */
597 void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname,
598 const GLfloat *param);
599 /** Set texture parameters */
600 void (*TexParameter)(struct gl_context *ctx,
601 struct gl_texture_object *texObj,
602 GLenum pname, const GLfloat *params);
603 /** Set the viewport */
604 void (*Viewport)(struct gl_context *ctx);
605 /*@}*/
606
607
608 /**
609 * \name Vertex/pixel buffer object functions
610 */
611 /*@{*/
612 struct gl_buffer_object * (*NewBufferObject)(struct gl_context *ctx,
613 GLuint buffer);
614
615 void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj );
616
617 GLboolean (*BufferData)(struct gl_context *ctx, GLenum target,
618 GLsizeiptrARB size, const GLvoid *data, GLenum usage,
619 GLenum storageFlags, struct gl_buffer_object *obj);
620
621 void (*BufferSubData)( struct gl_context *ctx, GLintptrARB offset,
622 GLsizeiptrARB size, const GLvoid *data,
623 struct gl_buffer_object *obj );
624
625 void (*GetBufferSubData)( struct gl_context *ctx,
626 GLintptrARB offset, GLsizeiptrARB size,
627 GLvoid *data, struct gl_buffer_object *obj );
628
629 void (*ClearBufferSubData)( struct gl_context *ctx,
630 GLintptr offset, GLsizeiptr size,
631 const GLvoid *clearValue,
632 GLsizeiptr clearValueSize,
633 struct gl_buffer_object *obj );
634
635 void (*CopyBufferSubData)( struct gl_context *ctx,
636 struct gl_buffer_object *src,
637 struct gl_buffer_object *dst,
638 GLintptr readOffset, GLintptr writeOffset,
639 GLsizeiptr size );
640
641 /* Returns pointer to the start of the mapped range.
642 * May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
643 */
644 void * (*MapBufferRange)( struct gl_context *ctx, GLintptr offset,
645 GLsizeiptr length, GLbitfield access,
646 struct gl_buffer_object *obj,
647 gl_map_buffer_index index);
648
649 void (*FlushMappedBufferRange)(struct gl_context *ctx,
650 GLintptr offset, GLsizeiptr length,
651 struct gl_buffer_object *obj,
652 gl_map_buffer_index index);
653
654 GLboolean (*UnmapBuffer)( struct gl_context *ctx,
655 struct gl_buffer_object *obj,
656 gl_map_buffer_index index);
657 /*@}*/
658
659 /**
660 * \name Functions for GL_APPLE_object_purgeable
661 */
662 /*@{*/
663 /* variations on ObjectPurgeable */
664 GLenum (*BufferObjectPurgeable)(struct gl_context *ctx,
665 struct gl_buffer_object *obj, GLenum option);
666 GLenum (*RenderObjectPurgeable)(struct gl_context *ctx,
667 struct gl_renderbuffer *obj, GLenum option);
668 GLenum (*TextureObjectPurgeable)(struct gl_context *ctx,
669 struct gl_texture_object *obj,
670 GLenum option);
671
672 /* variations on ObjectUnpurgeable */
673 GLenum (*BufferObjectUnpurgeable)(struct gl_context *ctx,
674 struct gl_buffer_object *obj,
675 GLenum option);
676 GLenum (*RenderObjectUnpurgeable)(struct gl_context *ctx,
677 struct gl_renderbuffer *obj,
678 GLenum option);
679 GLenum (*TextureObjectUnpurgeable)(struct gl_context *ctx,
680 struct gl_texture_object *obj,
681 GLenum option);
682 /*@}*/
683
684 /**
685 * \name Functions for GL_EXT_framebuffer_{object,blit,discard}.
686 */
687 /*@{*/
688 struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx,
689 GLuint name);
690 struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx,
691 GLuint name);
692 void (*BindFramebuffer)(struct gl_context *ctx, GLenum target,
693 struct gl_framebuffer *drawFb,
694 struct gl_framebuffer *readFb);
695 void (*FramebufferRenderbuffer)(struct gl_context *ctx,
696 struct gl_framebuffer *fb,
697 GLenum attachment,
698 struct gl_renderbuffer *rb);
699 void (*RenderTexture)(struct gl_context *ctx,
700 struct gl_framebuffer *fb,
701 struct gl_renderbuffer_attachment *att);
702 void (*FinishRenderTexture)(struct gl_context *ctx,
703 struct gl_renderbuffer *rb);
704 void (*ValidateFramebuffer)(struct gl_context *ctx,
705 struct gl_framebuffer *fb);
706 /*@}*/
707 void (*BlitFramebuffer)(struct gl_context *ctx,
708 struct gl_framebuffer *readFb,
709 struct gl_framebuffer *drawFb,
710 GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
711 GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
712 GLbitfield mask, GLenum filter);
713 void (*DiscardFramebuffer)(struct gl_context *ctx,
714 GLenum target, GLsizei numAttachments,
715 const GLenum *attachments);
716
717 /**
718 * \name Query objects
719 */
720 /*@{*/
721 struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id);
722 void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q);
723 void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q);
724 void (*QueryCounter)(struct gl_context *ctx, struct gl_query_object *q);
725 void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q);
726 void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q);
727 void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q);
728 /*@}*/
729
730 /**
731 * \name Performance monitors
732 */
733 /*@{*/
734 struct gl_perf_monitor_object * (*NewPerfMonitor)(struct gl_context *ctx);
735 void (*DeletePerfMonitor)(struct gl_context *ctx,
736 struct gl_perf_monitor_object *m);
737 GLboolean (*BeginPerfMonitor)(struct gl_context *ctx,
738 struct gl_perf_monitor_object *m);
739
740 /** Stop an active performance monitor, discarding results. */
741 void (*ResetPerfMonitor)(struct gl_context *ctx,
742 struct gl_perf_monitor_object *m);
743 void (*EndPerfMonitor)(struct gl_context *ctx,
744 struct gl_perf_monitor_object *m);
745 GLboolean (*IsPerfMonitorResultAvailable)(struct gl_context *ctx,
746 struct gl_perf_monitor_object *m);
747 void (*GetPerfMonitorResult)(struct gl_context *ctx,
748 struct gl_perf_monitor_object *m,
749 GLsizei dataSize,
750 GLuint *data,
751 GLint *bytesWritten);
752 /*@}*/
753
754
755 /**
756 * \name Vertex Array objects
757 */
758 /*@{*/
759 struct gl_vertex_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id);
760 void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_vertex_array_object *);
761 void (*BindArrayObject)(struct gl_context *ctx, struct gl_vertex_array_object *);
762 /*@}*/
763
764 /**
765 * \name GLSL-related functions (ARB extensions and OpenGL 2.x)
766 */
767 /*@{*/
768 struct gl_shader *(*NewShader)(struct gl_context *ctx,
769 GLuint name, GLenum type);
770 void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg);
771 /*@}*/
772
773
774 /**
775 * \name Support for multiple T&L engines
776 */
777 /*@{*/
778
779 /**
780 * Set by the driver-supplied T&L engine.
781 *
782 * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
783 */
784 GLuint CurrentExecPrimitive;
785
786 /**
787 * Current glBegin state of an in-progress compilation. May be
788 * GL_POINTS, GL_TRIANGLE_STRIP, etc. or PRIM_OUTSIDE_BEGIN_END
789 * or PRIM_UNKNOWN.
790 */
791 GLuint CurrentSavePrimitive;
792
793
794 #define FLUSH_STORED_VERTICES 0x1
795 #define FLUSH_UPDATE_CURRENT 0x2
796 /**
797 * Set by the driver-supplied T&L engine whenever vertices are buffered
798 * between glBegin()/glEnd() objects or __struct gl_contextRec::Current
799 * is not updated. A bitmask of the FLUSH_x values above.
800 *
801 * The dd_function_table::FlushVertices call below may be used to resolve
802 * these conditions.
803 */
804 GLbitfield NeedFlush;
805
806 /** Need to call SaveFlushVertices() upon state change? */
807 GLboolean SaveNeedFlush;
808
809 /* Called prior to any of the GLvertexformat functions being
810 * called. Paired with Driver.FlushVertices().
811 */
812 void (*BeginVertices)( struct gl_context *ctx );
813
814 /**
815 * If inside glBegin()/glEnd(), it should assert(0). Otherwise, if
816 * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
817 * vertices, if FLUSH_UPDATE_CURRENT bit is set updates
818 * __struct gl_contextRec::Current and gl_light_attrib::Material
819 *
820 * Note that the default T&L engine never clears the
821 * FLUSH_UPDATE_CURRENT bit, even after performing the update.
822 */
823 void (*FlushVertices)( struct gl_context *ctx, GLuint flags );
824 void (*SaveFlushVertices)( struct gl_context *ctx );
825
826 /**
827 * Give the driver the opportunity to hook in its own vtxfmt for
828 * compiling optimized display lists. This is called on each valid
829 * glBegin() during list compilation.
830 */
831 GLboolean (*NotifySaveBegin)( struct gl_context *ctx, GLenum mode );
832
833 /**
834 * Notify driver that the special derived value _NeedEyeCoords has
835 * changed.
836 */
837 void (*LightingSpaceChange)( struct gl_context *ctx );
838
839 /**
840 * Called by glNewList().
841 *
842 * Let the T&L component know what is going on with display lists
843 * in time to make changes to dispatch tables, etc.
844 */
845 void (*NewList)( struct gl_context *ctx, GLuint list, GLenum mode );
846 /**
847 * Called by glEndList().
848 *
849 * \sa dd_function_table::NewList.
850 */
851 void (*EndList)( struct gl_context *ctx );
852
853 /**
854 * Called by glCallList(s).
855 *
856 * Notify the T&L component before and after calling a display list.
857 */
858 void (*BeginCallList)( struct gl_context *ctx,
859 struct gl_display_list *dlist );
860 /**
861 * Called by glEndCallList().
862 *
863 * \sa dd_function_table::BeginCallList.
864 */
865 void (*EndCallList)( struct gl_context *ctx );
866
867 /**@}*/
868
869 /**
870 * \name GL_ARB_sync interfaces
871 */
872 /*@{*/
873 struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum);
874 void (*FenceSync)(struct gl_context *, struct gl_sync_object *,
875 GLenum, GLbitfield);
876 void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *);
877 void (*CheckSync)(struct gl_context *, struct gl_sync_object *);
878 void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *,
879 GLbitfield, GLuint64);
880 void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *,
881 GLbitfield, GLuint64);
882 /*@}*/
883
884 /** GL_NV_conditional_render */
885 void (*BeginConditionalRender)(struct gl_context *ctx,
886 struct gl_query_object *q,
887 GLenum mode);
888 void (*EndConditionalRender)(struct gl_context *ctx,
889 struct gl_query_object *q);
890
891 /**
892 * \name GL_OES_draw_texture interface
893 */
894 /*@{*/
895 void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
896 GLfloat width, GLfloat height);
897 /*@}*/
898
899 /**
900 * \name GL_OES_EGL_image interface
901 */
902 void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target,
903 struct gl_texture_object *texObj,
904 struct gl_texture_image *texImage,
905 GLeglImageOES image_handle);
906 void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx,
907 struct gl_renderbuffer *rb,
908 void *image_handle);
909
910 /**
911 * \name GL_EXT_transform_feedback interface
912 */
913 struct gl_transform_feedback_object *
914 (*NewTransformFeedback)(struct gl_context *ctx, GLuint name);
915 void (*DeleteTransformFeedback)(struct gl_context *ctx,
916 struct gl_transform_feedback_object *obj);
917 void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode,
918 struct gl_transform_feedback_object *obj);
919 void (*EndTransformFeedback)(struct gl_context *ctx,
920 struct gl_transform_feedback_object *obj);
921 void (*PauseTransformFeedback)(struct gl_context *ctx,
922 struct gl_transform_feedback_object *obj);
923 void (*ResumeTransformFeedback)(struct gl_context *ctx,
924 struct gl_transform_feedback_object *obj);
925
926 /**
927 * Return the number of vertices written to a stream during the last
928 * Begin/EndTransformFeedback block.
929 */
930 GLsizei (*GetTransformFeedbackVertexCount)(struct gl_context *ctx,
931 struct gl_transform_feedback_object *obj,
932 GLuint stream);
933
934 /**
935 * \name GL_NV_texture_barrier interface
936 */
937 void (*TextureBarrier)(struct gl_context *ctx);
938
939 /**
940 * \name GL_ARB_sampler_objects
941 */
942 struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx,
943 GLuint name);
944 void (*DeleteSamplerObject)(struct gl_context *ctx,
945 struct gl_sampler_object *samp);
946
947 /**
948 * \name Return a timestamp in nanoseconds as defined by GL_ARB_timer_query.
949 * This should be equivalent to glGetInteger64v(GL_TIMESTAMP);
950 */
951 uint64_t (*GetTimestamp)(struct gl_context *ctx);
952
953 /**
954 * \name GL_ARB_texture_multisample
955 */
956 void (*GetSamplePosition)(struct gl_context *ctx,
957 struct gl_framebuffer *fb,
958 GLuint index,
959 GLfloat *outValue);
960
961 /**
962 * \name NV_vdpau_interop interface
963 */
964 void (*VDPAUMapSurface)(struct gl_context *ctx, GLenum target,
965 GLenum access, GLboolean output,
966 struct gl_texture_object *texObj,
967 struct gl_texture_image *texImage,
968 const GLvoid *vdpSurface, GLuint index);
969 void (*VDPAUUnmapSurface)(struct gl_context *ctx, GLenum target,
970 GLenum access, GLboolean output,
971 struct gl_texture_object *texObj,
972 struct gl_texture_image *texImage,
973 const GLvoid *vdpSurface, GLuint index);
974
975 /**
976 * Query reset status for GL_ARB_robustness
977 *
978 * Per \c glGetGraphicsResetStatusARB, this function should return a
979 * non-zero value once after a reset. If a reset is non-atomic, the
980 * non-zero status should be returned for the duration of the reset.
981 */
982 GLenum (*GetGraphicsResetStatus)(struct gl_context *ctx);
983
984 /**
985 * \name GL_ARB_shader_image_load_store interface.
986 */
987 /** @{ */
988 void (*BindImageTexture)(struct gl_context *ctx,
989 struct gl_image_unit *unit,
990 struct gl_texture_object *texObj,
991 GLint level, GLboolean layered, GLint layer,
992 GLenum access, GLenum format);
993
994 void (*MemoryBarrier)(struct gl_context *ctx, GLbitfield barriers);
995 /** @} */
996
997 /**
998 * \name GL_ARB_compute_shader interface
999 */
1000 /*@{*/
1001 void (*DispatchCompute)(struct gl_context *ctx, const GLuint *num_groups);
1002 void (*DispatchComputeIndirect)(struct gl_context *ctx, GLintptr indirect);
1003 /*@}*/
1004 };
1005
1006
1007 /**
1008 * Per-vertex functions.
1009 *
1010 * These are the functions which can appear between glBegin and glEnd.
1011 * Depending on whether we're inside or outside a glBegin/End pair
1012 * and whether we're in immediate mode or building a display list, these
1013 * functions behave differently. This structure allows us to switch
1014 * between those modes more easily.
1015 *
1016 * Generally, these pointers point to functions in the VBO module.
1017 */
1018 typedef struct {
1019 void (GLAPIENTRYP ArrayElement)( GLint );
1020 void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat );
1021 void (GLAPIENTRYP Color3fv)( const GLfloat * );
1022 void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1023 void (GLAPIENTRYP Color4fv)( const GLfloat * );
1024 void (GLAPIENTRYP EdgeFlag)( GLboolean );
1025 void (GLAPIENTRYP EvalCoord1f)( GLfloat );
1026 void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * );
1027 void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat );
1028 void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * );
1029 void (GLAPIENTRYP EvalPoint1)( GLint );
1030 void (GLAPIENTRYP EvalPoint2)( GLint, GLint );
1031 void (GLAPIENTRYP FogCoordfEXT)( GLfloat );
1032 void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * );
1033 void (GLAPIENTRYP Indexf)( GLfloat );
1034 void (GLAPIENTRYP Indexfv)( const GLfloat * );
1035 void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * );
1036 void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat );
1037 void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * );
1038 void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat );
1039 void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * );
1040 void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat );
1041 void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * );
1042 void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat );
1043 void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * );
1044 void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat );
1045 void (GLAPIENTRYP Normal3fv)( const GLfloat * );
1046 void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat );
1047 void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * );
1048 void (GLAPIENTRYP TexCoord1f)( GLfloat );
1049 void (GLAPIENTRYP TexCoord1fv)( const GLfloat * );
1050 void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat );
1051 void (GLAPIENTRYP TexCoord2fv)( const GLfloat * );
1052 void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat );
1053 void (GLAPIENTRYP TexCoord3fv)( const GLfloat * );
1054 void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1055 void (GLAPIENTRYP TexCoord4fv)( const GLfloat * );
1056 void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat );
1057 void (GLAPIENTRYP Vertex2fv)( const GLfloat * );
1058 void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat );
1059 void (GLAPIENTRYP Vertex3fv)( const GLfloat * );
1060 void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1061 void (GLAPIENTRYP Vertex4fv)( const GLfloat * );
1062 void (GLAPIENTRYP CallList)( GLuint );
1063 void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * );
1064 void (GLAPIENTRYP Begin)( GLenum );
1065 void (GLAPIENTRYP End)( void );
1066 void (GLAPIENTRYP PrimitiveRestartNV)( void );
1067 /* Originally for GL_NV_vertex_program, now used only dlist.c and friends */
1068 void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x );
1069 void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v );
1070 void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y );
1071 void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v );
1072 void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
1073 void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v );
1074 void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1075 void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v );
1076 /* GL_ARB_vertex_program */
1077 void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x );
1078 void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v );
1079 void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y );
1080 void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v );
1081 void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
1082 void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v );
1083 void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1084 void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v );
1085
1086 /* GL_EXT_gpu_shader4 / GL 3.0 */
1087 void (GLAPIENTRYP VertexAttribI1i)( GLuint index, GLint x);
1088 void (GLAPIENTRYP VertexAttribI2i)( GLuint index, GLint x, GLint y);
1089 void (GLAPIENTRYP VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z);
1090 void (GLAPIENTRYP VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w);
1091 void (GLAPIENTRYP VertexAttribI2iv)( GLuint index, const GLint *v);
1092 void (GLAPIENTRYP VertexAttribI3iv)( GLuint index, const GLint *v);
1093 void (GLAPIENTRYP VertexAttribI4iv)( GLuint index, const GLint *v);
1094
1095 void (GLAPIENTRYP VertexAttribI1ui)( GLuint index, GLuint x);
1096 void (GLAPIENTRYP VertexAttribI2ui)( GLuint index, GLuint x, GLuint y);
1097 void (GLAPIENTRYP VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z);
1098 void (GLAPIENTRYP VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
1099 void (GLAPIENTRYP VertexAttribI2uiv)( GLuint index, const GLuint *v);
1100 void (GLAPIENTRYP VertexAttribI3uiv)( GLuint index, const GLuint *v);
1101 void (GLAPIENTRYP VertexAttribI4uiv)( GLuint index, const GLuint *v);
1102
1103 /* GL_ARB_vertex_type_10_10_10_2_rev / GL3.3 */
1104 void (GLAPIENTRYP VertexP2ui)( GLenum type, GLuint value );
1105 void (GLAPIENTRYP VertexP2uiv)( GLenum type, const GLuint *value);
1106
1107 void (GLAPIENTRYP VertexP3ui)( GLenum type, GLuint value );
1108 void (GLAPIENTRYP VertexP3uiv)( GLenum type, const GLuint *value);
1109
1110 void (GLAPIENTRYP VertexP4ui)( GLenum type, GLuint value );
1111 void (GLAPIENTRYP VertexP4uiv)( GLenum type, const GLuint *value);
1112
1113 void (GLAPIENTRYP TexCoordP1ui)( GLenum type, GLuint coords );
1114 void (GLAPIENTRYP TexCoordP1uiv)( GLenum type, const GLuint *coords );
1115
1116 void (GLAPIENTRYP TexCoordP2ui)( GLenum type, GLuint coords );
1117 void (GLAPIENTRYP TexCoordP2uiv)( GLenum type, const GLuint *coords );
1118
1119 void (GLAPIENTRYP TexCoordP3ui)( GLenum type, GLuint coords );
1120 void (GLAPIENTRYP TexCoordP3uiv)( GLenum type, const GLuint *coords );
1121
1122 void (GLAPIENTRYP TexCoordP4ui)( GLenum type, GLuint coords );
1123 void (GLAPIENTRYP TexCoordP4uiv)( GLenum type, const GLuint *coords );
1124
1125 void (GLAPIENTRYP MultiTexCoordP1ui)( GLenum texture, GLenum type, GLuint coords );
1126 void (GLAPIENTRYP MultiTexCoordP1uiv)( GLenum texture, GLenum type, const GLuint *coords );
1127 void (GLAPIENTRYP MultiTexCoordP2ui)( GLenum texture, GLenum type, GLuint coords );
1128 void (GLAPIENTRYP MultiTexCoordP2uiv)( GLenum texture, GLenum type, const GLuint *coords );
1129 void (GLAPIENTRYP MultiTexCoordP3ui)( GLenum texture, GLenum type, GLuint coords );
1130 void (GLAPIENTRYP MultiTexCoordP3uiv)( GLenum texture, GLenum type, const GLuint *coords );
1131 void (GLAPIENTRYP MultiTexCoordP4ui)( GLenum texture, GLenum type, GLuint coords );
1132 void (GLAPIENTRYP MultiTexCoordP4uiv)( GLenum texture, GLenum type, const GLuint *coords );
1133
1134 void (GLAPIENTRYP NormalP3ui)( GLenum type, GLuint coords );
1135 void (GLAPIENTRYP NormalP3uiv)( GLenum type, const GLuint *coords );
1136
1137 void (GLAPIENTRYP ColorP3ui)( GLenum type, GLuint color );
1138 void (GLAPIENTRYP ColorP3uiv)( GLenum type, const GLuint *color );
1139
1140 void (GLAPIENTRYP ColorP4ui)( GLenum type, GLuint color );
1141 void (GLAPIENTRYP ColorP4uiv)( GLenum type, const GLuint *color );
1142
1143 void (GLAPIENTRYP SecondaryColorP3ui)( GLenum type, GLuint color );
1144 void (GLAPIENTRYP SecondaryColorP3uiv)( GLenum type, const GLuint *color );
1145
1146 void (GLAPIENTRYP VertexAttribP1ui)( GLuint index, GLenum type,
1147 GLboolean normalized, GLuint value);
1148 void (GLAPIENTRYP VertexAttribP2ui)( GLuint index, GLenum type,
1149 GLboolean normalized, GLuint value);
1150 void (GLAPIENTRYP VertexAttribP3ui)( GLuint index, GLenum type,
1151 GLboolean normalized, GLuint value);
1152 void (GLAPIENTRYP VertexAttribP4ui)( GLuint index, GLenum type,
1153 GLboolean normalized, GLuint value);
1154 void (GLAPIENTRYP VertexAttribP1uiv)( GLuint index, GLenum type,
1155 GLboolean normalized,
1156 const GLuint *value);
1157 void (GLAPIENTRYP VertexAttribP2uiv)( GLuint index, GLenum type,
1158 GLboolean normalized,
1159 const GLuint *value);
1160 void (GLAPIENTRYP VertexAttribP3uiv)( GLuint index, GLenum type,
1161 GLboolean normalized,
1162 const GLuint *value);
1163 void (GLAPIENTRYP VertexAttribP4uiv)( GLuint index, GLenum type,
1164 GLboolean normalized,
1165 const GLuint *value);
1166
1167 /* GL_ARB_vertex_attrib_64bit / GL 4.1 */
1168 void (GLAPIENTRYP VertexAttribL1d)( GLuint index, GLdouble x);
1169 void (GLAPIENTRYP VertexAttribL2d)( GLuint index, GLdouble x, GLdouble y);
1170 void (GLAPIENTRYP VertexAttribL3d)( GLuint index, GLdouble x, GLdouble y, GLdouble z);
1171 void (GLAPIENTRYP VertexAttribL4d)( GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1172
1173
1174 void (GLAPIENTRYP VertexAttribL1dv)( GLuint index, const GLdouble *v);
1175 void (GLAPIENTRYP VertexAttribL2dv)( GLuint index, const GLdouble *v);
1176 void (GLAPIENTRYP VertexAttribL3dv)( GLuint index, const GLdouble *v);
1177 void (GLAPIENTRYP VertexAttribL4dv)( GLuint index, const GLdouble *v);
1178
1179 } GLvertexformat;
1180
1181
1182 #endif /* DD_INCLUDED */