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