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