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