mesa: remove Driver.DeleteShader
[mesa.git] / src / mesa / main / dd.h
1 /**
2 * \file dd.h
3 * Device driver interfaces.
4 */
5
6 /*
7 * Mesa 3-D graphics library
8 *
9 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a
12 * copy of this software and associated documentation files (the "Software"),
13 * to deal in the Software without restriction, including without limitation
14 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15 * and/or sell copies of the Software, and to permit persons to whom the
16 * Software is furnished to do so, subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included
19 * in all copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
25 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
26 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 * OTHER DEALINGS IN THE SOFTWARE.
28 */
29
30
31 #ifndef DD_INCLUDED
32 #define DD_INCLUDED
33
34 /* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */
35
36 #include "glheader.h"
37
38 struct gl_buffer_object;
39 struct gl_context;
40 struct gl_display_list;
41 struct gl_framebuffer;
42 struct gl_image_unit;
43 struct gl_pixelstore_attrib;
44 struct gl_program;
45 struct gl_renderbuffer;
46 struct gl_renderbuffer_attachment;
47 struct gl_shader;
48 struct gl_shader_program;
49 struct gl_texture_image;
50 struct gl_texture_object;
51
52 /* GL_ARB_vertex_buffer_object */
53 /* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return
54 * NULL) if buffer is unavailable for immediate mapping.
55 *
56 * Does GL_MAP_INVALIDATE_RANGE_BIT do this? It seems so, but it
57 * would require more book-keeping in the driver than seems necessary
58 * at this point.
59 *
60 * Does GL_MAP_INVALDIATE_BUFFER_BIT do this? Not really -- we don't
61 * want to provoke the driver to throw away the old storage, we will
62 * respect the contents of already referenced data.
63 */
64 #define MESA_MAP_NOWAIT_BIT 0x0040
65
66
67 /**
68 * Device driver function table.
69 * Core Mesa uses these function pointers to call into device drivers.
70 * Most of these functions directly correspond to OpenGL state commands.
71 * Core Mesa will call these functions after error checking has been done
72 * so that the drivers don't have to worry about error testing.
73 *
74 * Vertex transformation/clipping/lighting is patched into the T&L module.
75 * Rasterization functions are patched into the swrast module.
76 *
77 * Note: when new functions are added here, the drivers/common/driverfuncs.c
78 * file should be updated too!!!
79 */
80 struct dd_function_table {
81 /**
82 * Return a string as needed by glGetString().
83 * Only the GL_RENDERER query must be implemented. Otherwise, NULL can be
84 * returned.
85 */
86 const GLubyte * (*GetString)( struct gl_context *ctx, GLenum name );
87
88 /**
89 * Notify the driver after Mesa has made some internal state changes.
90 *
91 * This is in addition to any state change callbacks Mesa may already have
92 * made.
93 */
94 void (*UpdateState)( struct gl_context *ctx, GLbitfield new_state );
95
96 /**
97 * Resize the given framebuffer to the given size.
98 * XXX OBSOLETE: this function will be removed in the future.
99 */
100 void (*ResizeBuffers)( struct gl_context *ctx, struct gl_framebuffer *fb,
101 GLuint width, GLuint height);
102
103 /**
104 * This is called whenever glFinish() is called.
105 */
106 void (*Finish)( struct gl_context *ctx );
107
108 /**
109 * This is called whenever glFlush() is called.
110 */
111 void (*Flush)( struct gl_context *ctx );
112
113 /**
114 * Clear the color/depth/stencil/accum buffer(s).
115 * \param buffers a bitmask of BUFFER_BIT_* flags indicating which
116 * renderbuffers need to be cleared.
117 */
118 void (*Clear)( struct gl_context *ctx, GLbitfield buffers );
119
120 /**
121 * Execute glAccum command.
122 */
123 void (*Accum)( struct gl_context *ctx, GLenum op, GLfloat value );
124
125
126 /**
127 * Execute glRasterPos, updating the ctx->Current.Raster fields
128 */
129 void (*RasterPos)( struct gl_context *ctx, const GLfloat v[4] );
130
131 /**
132 * \name Image-related functions
133 */
134 /*@{*/
135
136 /**
137 * Called by glDrawPixels().
138 * \p unpack describes how to unpack the source image data.
139 */
140 void (*DrawPixels)( struct gl_context *ctx,
141 GLint x, GLint y, GLsizei width, GLsizei height,
142 GLenum format, GLenum type,
143 const struct gl_pixelstore_attrib *unpack,
144 const GLvoid *pixels );
145
146 /**
147 * Called by glReadPixels().
148 */
149 void (*ReadPixels)( struct gl_context *ctx,
150 GLint x, GLint y, GLsizei width, GLsizei height,
151 GLenum format, GLenum type,
152 const struct gl_pixelstore_attrib *unpack,
153 GLvoid *dest );
154
155 /**
156 * Called by glCopyPixels().
157 */
158 void (*CopyPixels)( struct gl_context *ctx, GLint srcx, GLint srcy,
159 GLsizei width, GLsizei height,
160 GLint dstx, GLint dsty, GLenum type );
161
162 /**
163 * Called by glBitmap().
164 */
165 void (*Bitmap)( struct gl_context *ctx,
166 GLint x, GLint y, GLsizei width, GLsizei height,
167 const struct gl_pixelstore_attrib *unpack,
168 const GLubyte *bitmap );
169 /*@}*/
170
171
172 /**
173 * \name Texture image functions
174 */
175 /*@{*/
176
177 /**
178 * Choose actual hardware texture format given the texture target, the
179 * user-provided source image format and type and the desired internal
180 * format. In some cases, srcFormat and srcType can be GL_NONE.
181 * Note: target may be GL_TEXTURE_CUBE_MAP, but never
182 * GL_TEXTURE_CUBE_MAP_[POSITIVE/NEGATIVE]_[XYZ].
183 * Called by glTexImage(), etc.
184 */
185 mesa_format (*ChooseTextureFormat)(struct gl_context *ctx,
186 GLenum target, GLint internalFormat,
187 GLenum srcFormat, GLenum srcType );
188
189 /**
190 * Determine sample counts support for a particular target and format
191 *
192 * \param ctx GL context
193 * \param target GL target enum
194 * \param internalFormat GL format enum
195 * \param samples Buffer to hold the returned sample counts.
196 * Drivers \b must \b not return more than 16 counts.
197 *
198 * \returns
199 * The number of sample counts actually written to \c samples. If
200 * \c internaFormat is not renderable, zero is returned.
201 */
202 size_t (*QuerySamplesForFormat)(struct gl_context *ctx,
203 GLenum target,
204 GLenum internalFormat,
205 int samples[16]);
206
207 /**
208 * Called by glTexImage[123]D() and glCopyTexImage[12]D()
209 * Allocate texture memory and copy the user's image to the buffer.
210 * The gl_texture_image fields, etc. will be fully initialized.
211 * The parameters are the same as glTexImage3D(), plus:
212 * \param dims 1, 2, or 3 indicating glTexImage1/2/3D()
213 * \param packing describes how to unpack the source data.
214 * \param texImage is the destination texture image.
215 */
216 void (*TexImage)(struct gl_context *ctx, GLuint dims,
217 struct gl_texture_image *texImage,
218 GLenum format, GLenum type, const GLvoid *pixels,
219 const struct gl_pixelstore_attrib *packing);
220
221 /**
222 * Called by glTexSubImage[123]D().
223 * Replace a subset of the target texture with new texel data.
224 */
225 void (*TexSubImage)(struct gl_context *ctx, GLuint dims,
226 struct gl_texture_image *texImage,
227 GLint xoffset, GLint yoffset, GLint zoffset,
228 GLsizei width, GLsizei height, GLint depth,
229 GLenum format, GLenum type,
230 const GLvoid *pixels,
231 const struct gl_pixelstore_attrib *packing);
232
233
234 /**
235 * Called by glGetTexImage(), glGetTextureSubImage().
236 */
237 void (*GetTexSubImage)(struct gl_context *ctx,
238 GLint xoffset, GLint yoffset, GLint zoffset,
239 GLsizei width, GLsizei height, GLsizei depth,
240 GLenum format, GLenum type, GLvoid *pixels,
241 struct gl_texture_image *texImage);
242
243 /**
244 * Called by glClearTex[Sub]Image
245 *
246 * Clears a rectangular region of the image to a given value. The
247 * clearValue argument is either NULL or points to a single texel to use as
248 * the clear value in the same internal format as the texture image. If it
249 * is NULL then the texture should be cleared to zeroes.
250 */
251 void (*ClearTexSubImage)(struct gl_context *ctx,
252 struct gl_texture_image *texImage,
253 GLint xoffset, GLint yoffset, GLint zoffset,
254 GLsizei width, GLsizei height, GLsizei depth,
255 const GLvoid *clearValue);
256
257 /**
258 * Called by glCopyTex[Sub]Image[123]D().
259 *
260 * This function should copy a rectangular region in the rb to a single
261 * destination slice, specified by @slice. In the case of 1D array
262 * textures (where one GL call can potentially affect multiple destination
263 * slices), core mesa takes care of calling this function multiple times,
264 * once for each scanline to be copied.
265 */
266 void (*CopyTexSubImage)(struct gl_context *ctx, GLuint dims,
267 struct gl_texture_image *texImage,
268 GLint xoffset, GLint yoffset, GLint slice,
269 struct gl_renderbuffer *rb,
270 GLint x, GLint y,
271 GLsizei width, GLsizei height);
272 /**
273 * Called by glCopyImageSubData().
274 *
275 * This function should copy one 2-D slice from src_teximage or
276 * src_renderbuffer to dst_teximage or dst_renderbuffer. Either the
277 * teximage or renderbuffer pointer will be non-null to indicate which
278 * is the real src/dst.
279 *
280 * If one of the textures is 3-D or is a 1-D or 2-D array
281 * texture, this function will be called multiple times: once for each
282 * slice. If one of the textures is a cube map, this function will be
283 * called once for each face to be copied.
284 */
285 void (*CopyImageSubData)(struct gl_context *ctx,
286 struct gl_texture_image *src_teximage,
287 struct gl_renderbuffer *src_renderbuffer,
288 int src_x, int src_y, int src_z,
289 struct gl_texture_image *dst_teximage,
290 struct gl_renderbuffer *dst_renderbuffer,
291 int dst_x, int dst_y, int dst_z,
292 int src_width, int src_height);
293
294 /**
295 * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
296 * Note that if the texture is a cube map, the <target> parameter will
297 * indicate which cube face to generate (GL_POSITIVE/NEGATIVE_X/Y/Z).
298 * texObj->BaseLevel is the level from which to generate the remaining
299 * mipmap levels.
300 */
301 void (*GenerateMipmap)(struct gl_context *ctx, GLenum target,
302 struct gl_texture_object *texObj);
303
304 /**
305 * Called by glTexImage, glCompressedTexImage, glCopyTexImage
306 * and glTexStorage to check if the dimensions of the texture image
307 * are too large.
308 * \param target any GL_PROXY_TEXTURE_x target
309 * \return GL_TRUE if the image is OK, GL_FALSE if too large
310 */
311 GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target,
312 GLint level, mesa_format format,
313 GLint width, GLint height,
314 GLint depth, GLint border);
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 /** Bind a vertex/fragment program */
473 void (*BindProgram)(struct gl_context *ctx, GLenum target,
474 struct gl_program *prog);
475 /** Allocate a new program */
476 struct gl_program * (*NewProgram)(struct gl_context *ctx, GLenum target,
477 GLuint id);
478 /** Delete a program */
479 void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog);
480 /**
481 * Notify driver that a program string (and GPU code) has been specified
482 * or modified. Return GL_TRUE or GL_FALSE to indicate if the program is
483 * supported by the driver.
484 */
485 GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target,
486 struct gl_program *prog);
487
488 /**
489 * Notify driver that the sampler uniforms for the current program have
490 * changed. On some drivers, this may require shader recompiles.
491 */
492 void (*SamplerUniformChange)(struct gl_context *ctx, GLenum target,
493 struct gl_program *prog);
494
495 /** Query if program can be loaded onto hardware */
496 GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target,
497 struct gl_program *prog);
498
499 /*@}*/
500
501 /**
502 * \name GLSL shader/program functions.
503 */
504 /*@{*/
505 /**
506 * Called when a shader program is linked.
507 *
508 * This gives drivers an opportunity to clone the IR and make their
509 * own transformations on it for the purposes of code generation.
510 */
511 GLboolean (*LinkShader)(struct gl_context *ctx,
512 struct gl_shader_program *shader);
513 /*@}*/
514
515 /**
516 * \name State-changing functions.
517 *
518 * \note drawing functions are above.
519 *
520 * These functions are called by their corresponding OpenGL API functions.
521 * They are \e also called by the gl_PopAttrib() function!!!
522 * May add more functions like these to the device driver in the future.
523 */
524 /*@{*/
525 /** Specify the alpha test function */
526 void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref);
527 /** Set the blend color */
528 void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]);
529 /** Set the blend equation */
530 void (*BlendEquationSeparate)(struct gl_context *ctx,
531 GLenum modeRGB, GLenum modeA);
532 void (*BlendEquationSeparatei)(struct gl_context *ctx, GLuint buffer,
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 void (*BlendFuncSeparatei)(struct gl_context *ctx, GLuint buffer,
539 GLenum sfactorRGB, GLenum dfactorRGB,
540 GLenum sfactorA, GLenum dfactorA);
541 /** Specify a plane against which all geometry is clipped */
542 void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *eq);
543 /** Enable and disable writing of frame buffer color components */
544 void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask,
545 GLboolean bmask, GLboolean amask );
546 void (*ColorMaskIndexed)(struct gl_context *ctx, GLuint buf, GLboolean rmask,
547 GLboolean gmask, GLboolean bmask, GLboolean amask);
548 /** Cause a material color to track the current color */
549 void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode);
550 /** Specify whether front- or back-facing facets can be culled */
551 void (*CullFace)(struct gl_context *ctx, GLenum mode);
552 /** Define front- and back-facing polygons */
553 void (*FrontFace)(struct gl_context *ctx, GLenum mode);
554 /** Specify the value used for depth buffer comparisons */
555 void (*DepthFunc)(struct gl_context *ctx, GLenum func);
556 /** Enable or disable writing into the depth buffer */
557 void (*DepthMask)(struct gl_context *ctx, GLboolean flag);
558 /** Specify mapping of depth values from NDC to window coordinates */
559 void (*DepthRange)(struct gl_context *ctx);
560 /** Specify the current buffer for writing */
561 void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer );
562 /** Specify the buffers for writing for fragment programs*/
563 void (*DrawBuffers)(struct gl_context *ctx, GLsizei n, const GLenum *buffers);
564 /** Enable or disable server-side gl capabilities */
565 void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state);
566 /** Specify fog parameters */
567 void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params);
568 /** Specify implementation-specific hints */
569 void (*Hint)(struct gl_context *ctx, GLenum target, GLenum mode);
570 /** Set light source parameters.
571 * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
572 * been transformed to eye-space.
573 */
574 void (*Lightfv)(struct gl_context *ctx, GLenum light,
575 GLenum pname, const GLfloat *params );
576 /** Set the lighting model parameters */
577 void (*LightModelfv)(struct gl_context *ctx, GLenum pname,
578 const GLfloat *params);
579 /** Specify the line stipple pattern */
580 void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern );
581 /** Specify the width of rasterized lines */
582 void (*LineWidth)(struct gl_context *ctx, GLfloat width);
583 /** Specify a logical pixel operation for color index rendering */
584 void (*LogicOpcode)(struct gl_context *ctx, GLenum opcode);
585 void (*PointParameterfv)(struct gl_context *ctx, GLenum pname,
586 const GLfloat *params);
587 /** Specify the diameter of rasterized points */
588 void (*PointSize)(struct gl_context *ctx, GLfloat size);
589 /** Select a polygon rasterization mode */
590 void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode);
591 /** Set the scale and units used to calculate depth values */
592 void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units, GLfloat clamp);
593 /** Set the polygon stippling pattern */
594 void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask );
595 /* Specifies the current buffer for reading */
596 void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer );
597 /** Set rasterization mode */
598 void (*RenderMode)(struct gl_context *ctx, GLenum mode );
599 /** Define the scissor box */
600 void (*Scissor)(struct gl_context *ctx);
601 /** Select flat or smooth shading */
602 void (*ShadeModel)(struct gl_context *ctx, GLenum mode);
603 /** OpenGL 2.0 two-sided StencilFunc */
604 void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func,
605 GLint ref, GLuint mask);
606 /** OpenGL 2.0 two-sided StencilMask */
607 void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask);
608 /** OpenGL 2.0 two-sided StencilOp */
609 void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail,
610 GLenum zfail, GLenum zpass);
611 /** Control the generation of texture coordinates */
612 void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname,
613 const GLfloat *params);
614 /** Set texture environment parameters */
615 void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname,
616 const GLfloat *param);
617 /** Set texture parameters */
618 void (*TexParameter)(struct gl_context *ctx,
619 struct gl_texture_object *texObj,
620 GLenum pname, const GLfloat *params);
621 /** Set the viewport */
622 void (*Viewport)(struct gl_context *ctx);
623 /*@}*/
624
625
626 /**
627 * \name Vertex/pixel buffer object functions
628 */
629 /*@{*/
630 struct gl_buffer_object * (*NewBufferObject)(struct gl_context *ctx,
631 GLuint buffer);
632
633 void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj );
634
635 GLboolean (*BufferData)(struct gl_context *ctx, GLenum target,
636 GLsizeiptrARB size, const GLvoid *data, GLenum usage,
637 GLenum storageFlags, struct gl_buffer_object *obj);
638
639 void (*BufferSubData)( struct gl_context *ctx, GLintptrARB offset,
640 GLsizeiptrARB size, const GLvoid *data,
641 struct gl_buffer_object *obj );
642
643 void (*GetBufferSubData)( struct gl_context *ctx,
644 GLintptrARB offset, GLsizeiptrARB size,
645 GLvoid *data, struct gl_buffer_object *obj );
646
647 void (*ClearBufferSubData)( struct gl_context *ctx,
648 GLintptr offset, GLsizeiptr size,
649 const GLvoid *clearValue,
650 GLsizeiptr clearValueSize,
651 struct gl_buffer_object *obj );
652
653 void (*CopyBufferSubData)( struct gl_context *ctx,
654 struct gl_buffer_object *src,
655 struct gl_buffer_object *dst,
656 GLintptr readOffset, GLintptr writeOffset,
657 GLsizeiptr size );
658
659 /* Returns pointer to the start of the mapped range.
660 * May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
661 */
662 void * (*MapBufferRange)( struct gl_context *ctx, GLintptr offset,
663 GLsizeiptr length, GLbitfield access,
664 struct gl_buffer_object *obj,
665 gl_map_buffer_index index);
666
667 void (*FlushMappedBufferRange)(struct gl_context *ctx,
668 GLintptr offset, GLsizeiptr length,
669 struct gl_buffer_object *obj,
670 gl_map_buffer_index index);
671
672 GLboolean (*UnmapBuffer)( struct gl_context *ctx,
673 struct gl_buffer_object *obj,
674 gl_map_buffer_index index);
675 /*@}*/
676
677 /**
678 * \name Functions for GL_APPLE_object_purgeable
679 */
680 /*@{*/
681 /* variations on ObjectPurgeable */
682 GLenum (*BufferObjectPurgeable)(struct gl_context *ctx,
683 struct gl_buffer_object *obj, GLenum option);
684 GLenum (*RenderObjectPurgeable)(struct gl_context *ctx,
685 struct gl_renderbuffer *obj, GLenum option);
686 GLenum (*TextureObjectPurgeable)(struct gl_context *ctx,
687 struct gl_texture_object *obj,
688 GLenum option);
689
690 /* variations on ObjectUnpurgeable */
691 GLenum (*BufferObjectUnpurgeable)(struct gl_context *ctx,
692 struct gl_buffer_object *obj,
693 GLenum option);
694 GLenum (*RenderObjectUnpurgeable)(struct gl_context *ctx,
695 struct gl_renderbuffer *obj,
696 GLenum option);
697 GLenum (*TextureObjectUnpurgeable)(struct gl_context *ctx,
698 struct gl_texture_object *obj,
699 GLenum option);
700 /*@}*/
701
702 /**
703 * \name Functions for GL_EXT_framebuffer_{object,blit,discard}.
704 */
705 /*@{*/
706 struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx,
707 GLuint name);
708 struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx,
709 GLuint name);
710 void (*BindFramebuffer)(struct gl_context *ctx, GLenum target,
711 struct gl_framebuffer *drawFb,
712 struct gl_framebuffer *readFb);
713 void (*FramebufferRenderbuffer)(struct gl_context *ctx,
714 struct gl_framebuffer *fb,
715 GLenum attachment,
716 struct gl_renderbuffer *rb);
717 void (*RenderTexture)(struct gl_context *ctx,
718 struct gl_framebuffer *fb,
719 struct gl_renderbuffer_attachment *att);
720 void (*FinishRenderTexture)(struct gl_context *ctx,
721 struct gl_renderbuffer *rb);
722 void (*ValidateFramebuffer)(struct gl_context *ctx,
723 struct gl_framebuffer *fb);
724 /*@}*/
725 void (*BlitFramebuffer)(struct gl_context *ctx,
726 struct gl_framebuffer *readFb,
727 struct gl_framebuffer *drawFb,
728 GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
729 GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
730 GLbitfield mask, GLenum filter);
731 void (*DiscardFramebuffer)(struct gl_context *ctx,
732 GLenum target, GLsizei numAttachments,
733 const GLenum *attachments);
734
735 /**
736 * \name Query objects
737 */
738 /*@{*/
739 struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id);
740 void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q);
741 void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q);
742 void (*QueryCounter)(struct gl_context *ctx, struct gl_query_object *q);
743 void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q);
744 void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q);
745 void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q);
746 /*@}*/
747
748 /**
749 * \name Performance monitors
750 */
751 /*@{*/
752 struct gl_perf_monitor_object * (*NewPerfMonitor)(struct gl_context *ctx);
753 void (*DeletePerfMonitor)(struct gl_context *ctx,
754 struct gl_perf_monitor_object *m);
755 GLboolean (*BeginPerfMonitor)(struct gl_context *ctx,
756 struct gl_perf_monitor_object *m);
757
758 /** Stop an active performance monitor, discarding results. */
759 void (*ResetPerfMonitor)(struct gl_context *ctx,
760 struct gl_perf_monitor_object *m);
761 void (*EndPerfMonitor)(struct gl_context *ctx,
762 struct gl_perf_monitor_object *m);
763 GLboolean (*IsPerfMonitorResultAvailable)(struct gl_context *ctx,
764 struct gl_perf_monitor_object *m);
765 void (*GetPerfMonitorResult)(struct gl_context *ctx,
766 struct gl_perf_monitor_object *m,
767 GLsizei dataSize,
768 GLuint *data,
769 GLint *bytesWritten);
770 /*@}*/
771
772
773 /**
774 * \name Vertex Array objects
775 */
776 /*@{*/
777 struct gl_vertex_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id);
778 void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_vertex_array_object *);
779 void (*BindArrayObject)(struct gl_context *ctx, struct gl_vertex_array_object *);
780 /*@}*/
781
782 /**
783 * \name GLSL-related functions (ARB extensions and OpenGL 2.x)
784 */
785 /*@{*/
786 struct gl_shader *(*NewShader)(struct gl_context *ctx,
787 GLuint name, GLenum type);
788 struct gl_shader_program *(*NewShaderProgram)(GLuint name);
789 void (*DeleteShaderProgram)(struct gl_context *ctx,
790 struct gl_shader_program *shProg);
791 void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg);
792 /*@}*/
793
794
795 /**
796 * \name Support for multiple T&L engines
797 */
798 /*@{*/
799
800 /**
801 * Set by the driver-supplied T&L engine.
802 *
803 * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
804 */
805 GLuint CurrentExecPrimitive;
806
807 /**
808 * Current glBegin state of an in-progress compilation. May be
809 * GL_POINTS, GL_TRIANGLE_STRIP, etc. or PRIM_OUTSIDE_BEGIN_END
810 * or PRIM_UNKNOWN.
811 */
812 GLuint CurrentSavePrimitive;
813
814
815 #define FLUSH_STORED_VERTICES 0x1
816 #define FLUSH_UPDATE_CURRENT 0x2
817 /**
818 * Set by the driver-supplied T&L engine whenever vertices are buffered
819 * between glBegin()/glEnd() objects or __struct gl_contextRec::Current
820 * is not updated. A bitmask of the FLUSH_x values above.
821 *
822 * The dd_function_table::FlushVertices call below may be used to resolve
823 * these conditions.
824 */
825 GLbitfield NeedFlush;
826
827 /** Need to call SaveFlushVertices() upon state change? */
828 GLboolean SaveNeedFlush;
829
830 /* Called prior to any of the GLvertexformat functions being
831 * called. Paired with Driver.FlushVertices().
832 */
833 void (*BeginVertices)( struct gl_context *ctx );
834
835 /**
836 * If inside glBegin()/glEnd(), it should assert(0). Otherwise, if
837 * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
838 * vertices, if FLUSH_UPDATE_CURRENT bit is set updates
839 * __struct gl_contextRec::Current and gl_light_attrib::Material
840 *
841 * Note that the default T&L engine never clears the
842 * FLUSH_UPDATE_CURRENT bit, even after performing the update.
843 */
844 void (*FlushVertices)( struct gl_context *ctx, GLuint flags );
845 void (*SaveFlushVertices)( struct gl_context *ctx );
846
847 /**
848 * Give the driver the opportunity to hook in its own vtxfmt for
849 * compiling optimized display lists. This is called on each valid
850 * glBegin() during list compilation.
851 */
852 GLboolean (*NotifySaveBegin)( struct gl_context *ctx, GLenum mode );
853
854 /**
855 * Notify driver that the special derived value _NeedEyeCoords has
856 * changed.
857 */
858 void (*LightingSpaceChange)( struct gl_context *ctx );
859
860 /**
861 * Called by glNewList().
862 *
863 * Let the T&L component know what is going on with display lists
864 * in time to make changes to dispatch tables, etc.
865 */
866 void (*NewList)( struct gl_context *ctx, GLuint list, GLenum mode );
867 /**
868 * Called by glEndList().
869 *
870 * \sa dd_function_table::NewList.
871 */
872 void (*EndList)( struct gl_context *ctx );
873
874 /**
875 * Called by glCallList(s).
876 *
877 * Notify the T&L component before and after calling a display list.
878 */
879 void (*BeginCallList)( struct gl_context *ctx,
880 struct gl_display_list *dlist );
881 /**
882 * Called by glEndCallList().
883 *
884 * \sa dd_function_table::BeginCallList.
885 */
886 void (*EndCallList)( struct gl_context *ctx );
887
888 /**@}*/
889
890 /**
891 * \name GL_ARB_sync interfaces
892 */
893 /*@{*/
894 struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum);
895 void (*FenceSync)(struct gl_context *, struct gl_sync_object *,
896 GLenum, GLbitfield);
897 void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *);
898 void (*CheckSync)(struct gl_context *, struct gl_sync_object *);
899 void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *,
900 GLbitfield, GLuint64);
901 void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *,
902 GLbitfield, GLuint64);
903 /*@}*/
904
905 /** GL_NV_conditional_render */
906 void (*BeginConditionalRender)(struct gl_context *ctx,
907 struct gl_query_object *q,
908 GLenum mode);
909 void (*EndConditionalRender)(struct gl_context *ctx,
910 struct gl_query_object *q);
911
912 /**
913 * \name GL_OES_draw_texture interface
914 */
915 /*@{*/
916 void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
917 GLfloat width, GLfloat height);
918 /*@}*/
919
920 /**
921 * \name GL_OES_EGL_image interface
922 */
923 void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target,
924 struct gl_texture_object *texObj,
925 struct gl_texture_image *texImage,
926 GLeglImageOES image_handle);
927 void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx,
928 struct gl_renderbuffer *rb,
929 void *image_handle);
930
931 /**
932 * \name GL_EXT_transform_feedback interface
933 */
934 struct gl_transform_feedback_object *
935 (*NewTransformFeedback)(struct gl_context *ctx, GLuint name);
936 void (*DeleteTransformFeedback)(struct gl_context *ctx,
937 struct gl_transform_feedback_object *obj);
938 void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode,
939 struct gl_transform_feedback_object *obj);
940 void (*EndTransformFeedback)(struct gl_context *ctx,
941 struct gl_transform_feedback_object *obj);
942 void (*PauseTransformFeedback)(struct gl_context *ctx,
943 struct gl_transform_feedback_object *obj);
944 void (*ResumeTransformFeedback)(struct gl_context *ctx,
945 struct gl_transform_feedback_object *obj);
946
947 /**
948 * Return the number of vertices written to a stream during the last
949 * Begin/EndTransformFeedback block.
950 */
951 GLsizei (*GetTransformFeedbackVertexCount)(struct gl_context *ctx,
952 struct gl_transform_feedback_object *obj,
953 GLuint stream);
954
955 /**
956 * \name GL_NV_texture_barrier interface
957 */
958 void (*TextureBarrier)(struct gl_context *ctx);
959
960 /**
961 * \name GL_ARB_sampler_objects
962 */
963 struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx,
964 GLuint name);
965 void (*DeleteSamplerObject)(struct gl_context *ctx,
966 struct gl_sampler_object *samp);
967
968 /**
969 * \name Return a timestamp in nanoseconds as defined by GL_ARB_timer_query.
970 * This should be equivalent to glGetInteger64v(GL_TIMESTAMP);
971 */
972 uint64_t (*GetTimestamp)(struct gl_context *ctx);
973
974 /**
975 * \name GL_ARB_texture_multisample
976 */
977 void (*GetSamplePosition)(struct gl_context *ctx,
978 struct gl_framebuffer *fb,
979 GLuint index,
980 GLfloat *outValue);
981
982 /**
983 * \name NV_vdpau_interop interface
984 */
985 void (*VDPAUMapSurface)(struct gl_context *ctx, GLenum target,
986 GLenum access, GLboolean output,
987 struct gl_texture_object *texObj,
988 struct gl_texture_image *texImage,
989 const GLvoid *vdpSurface, GLuint index);
990 void (*VDPAUUnmapSurface)(struct gl_context *ctx, GLenum target,
991 GLenum access, GLboolean output,
992 struct gl_texture_object *texObj,
993 struct gl_texture_image *texImage,
994 const GLvoid *vdpSurface, GLuint index);
995
996 /**
997 * Query reset status for GL_ARB_robustness
998 *
999 * Per \c glGetGraphicsResetStatusARB, this function should return a
1000 * non-zero value once after a reset. If a reset is non-atomic, the
1001 * non-zero status should be returned for the duration of the reset.
1002 */
1003 GLenum (*GetGraphicsResetStatus)(struct gl_context *ctx);
1004
1005 /**
1006 * \name GL_ARB_shader_image_load_store interface.
1007 */
1008 /** @{ */
1009 void (*BindImageTexture)(struct gl_context *ctx,
1010 struct gl_image_unit *unit,
1011 struct gl_texture_object *texObj,
1012 GLint level, GLboolean layered, GLint layer,
1013 GLenum access, GLenum format);
1014
1015 void (*MemoryBarrier)(struct gl_context *ctx, GLbitfield barriers);
1016 /** @} */
1017
1018 /**
1019 * \name GL_ARB_compute_shader interface
1020 */
1021 /*@{*/
1022 void (*DispatchCompute)(struct gl_context *ctx, const GLuint *num_groups);
1023 void (*DispatchComputeIndirect)(struct gl_context *ctx, GLintptr indirect);
1024 /*@}*/
1025 };
1026
1027
1028 /**
1029 * Per-vertex functions.
1030 *
1031 * These are the functions which can appear between glBegin and glEnd.
1032 * Depending on whether we're inside or outside a glBegin/End pair
1033 * and whether we're in immediate mode or building a display list, these
1034 * functions behave differently. This structure allows us to switch
1035 * between those modes more easily.
1036 *
1037 * Generally, these pointers point to functions in the VBO module.
1038 */
1039 typedef struct {
1040 void (GLAPIENTRYP ArrayElement)( GLint );
1041 void (GLAPIENTRYP Color3f)( GLfloat, GLfloat, GLfloat );
1042 void (GLAPIENTRYP Color3fv)( const GLfloat * );
1043 void (GLAPIENTRYP Color4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1044 void (GLAPIENTRYP Color4fv)( const GLfloat * );
1045 void (GLAPIENTRYP EdgeFlag)( GLboolean );
1046 void (GLAPIENTRYP EvalCoord1f)( GLfloat );
1047 void (GLAPIENTRYP EvalCoord1fv)( const GLfloat * );
1048 void (GLAPIENTRYP EvalCoord2f)( GLfloat, GLfloat );
1049 void (GLAPIENTRYP EvalCoord2fv)( const GLfloat * );
1050 void (GLAPIENTRYP EvalPoint1)( GLint );
1051 void (GLAPIENTRYP EvalPoint2)( GLint, GLint );
1052 void (GLAPIENTRYP FogCoordfEXT)( GLfloat );
1053 void (GLAPIENTRYP FogCoordfvEXT)( const GLfloat * );
1054 void (GLAPIENTRYP Indexf)( GLfloat );
1055 void (GLAPIENTRYP Indexfv)( const GLfloat * );
1056 void (GLAPIENTRYP Materialfv)( GLenum face, GLenum pname, const GLfloat * );
1057 void (GLAPIENTRYP MultiTexCoord1fARB)( GLenum, GLfloat );
1058 void (GLAPIENTRYP MultiTexCoord1fvARB)( GLenum, const GLfloat * );
1059 void (GLAPIENTRYP MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat );
1060 void (GLAPIENTRYP MultiTexCoord2fvARB)( GLenum, const GLfloat * );
1061 void (GLAPIENTRYP MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat );
1062 void (GLAPIENTRYP MultiTexCoord3fvARB)( GLenum, const GLfloat * );
1063 void (GLAPIENTRYP MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat );
1064 void (GLAPIENTRYP MultiTexCoord4fvARB)( GLenum, const GLfloat * );
1065 void (GLAPIENTRYP Normal3f)( GLfloat, GLfloat, GLfloat );
1066 void (GLAPIENTRYP Normal3fv)( const GLfloat * );
1067 void (GLAPIENTRYP SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat );
1068 void (GLAPIENTRYP SecondaryColor3fvEXT)( const GLfloat * );
1069 void (GLAPIENTRYP TexCoord1f)( GLfloat );
1070 void (GLAPIENTRYP TexCoord1fv)( const GLfloat * );
1071 void (GLAPIENTRYP TexCoord2f)( GLfloat, GLfloat );
1072 void (GLAPIENTRYP TexCoord2fv)( const GLfloat * );
1073 void (GLAPIENTRYP TexCoord3f)( GLfloat, GLfloat, GLfloat );
1074 void (GLAPIENTRYP TexCoord3fv)( const GLfloat * );
1075 void (GLAPIENTRYP TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1076 void (GLAPIENTRYP TexCoord4fv)( const GLfloat * );
1077 void (GLAPIENTRYP Vertex2f)( GLfloat, GLfloat );
1078 void (GLAPIENTRYP Vertex2fv)( const GLfloat * );
1079 void (GLAPIENTRYP Vertex3f)( GLfloat, GLfloat, GLfloat );
1080 void (GLAPIENTRYP Vertex3fv)( const GLfloat * );
1081 void (GLAPIENTRYP Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat );
1082 void (GLAPIENTRYP Vertex4fv)( const GLfloat * );
1083 void (GLAPIENTRYP CallList)( GLuint );
1084 void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * );
1085 void (GLAPIENTRYP Begin)( GLenum );
1086 void (GLAPIENTRYP End)( void );
1087 void (GLAPIENTRYP PrimitiveRestartNV)( void );
1088 /* Originally for GL_NV_vertex_program, now used only dlist.c and friends */
1089 void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x );
1090 void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v );
1091 void (GLAPIENTRYP VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y );
1092 void (GLAPIENTRYP VertexAttrib2fvNV)( GLuint index, const GLfloat *v );
1093 void (GLAPIENTRYP VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
1094 void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v );
1095 void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1096 void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v );
1097 /* GL_ARB_vertex_program */
1098 void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x );
1099 void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v );
1100 void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y );
1101 void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v );
1102 void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z );
1103 void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v );
1104 void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
1105 void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v );
1106
1107 /* GL_EXT_gpu_shader4 / GL 3.0 */
1108 void (GLAPIENTRYP VertexAttribI1i)( GLuint index, GLint x);
1109 void (GLAPIENTRYP VertexAttribI2i)( GLuint index, GLint x, GLint y);
1110 void (GLAPIENTRYP VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z);
1111 void (GLAPIENTRYP VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w);
1112 void (GLAPIENTRYP VertexAttribI2iv)( GLuint index, const GLint *v);
1113 void (GLAPIENTRYP VertexAttribI3iv)( GLuint index, const GLint *v);
1114 void (GLAPIENTRYP VertexAttribI4iv)( GLuint index, const GLint *v);
1115
1116 void (GLAPIENTRYP VertexAttribI1ui)( GLuint index, GLuint x);
1117 void (GLAPIENTRYP VertexAttribI2ui)( GLuint index, GLuint x, GLuint y);
1118 void (GLAPIENTRYP VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z);
1119 void (GLAPIENTRYP VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
1120 void (GLAPIENTRYP VertexAttribI2uiv)( GLuint index, const GLuint *v);
1121 void (GLAPIENTRYP VertexAttribI3uiv)( GLuint index, const GLuint *v);
1122 void (GLAPIENTRYP VertexAttribI4uiv)( GLuint index, const GLuint *v);
1123
1124 /* GL_ARB_vertex_type_10_10_10_2_rev / GL3.3 */
1125 void (GLAPIENTRYP VertexP2ui)( GLenum type, GLuint value );
1126 void (GLAPIENTRYP VertexP2uiv)( GLenum type, const GLuint *value);
1127
1128 void (GLAPIENTRYP VertexP3ui)( GLenum type, GLuint value );
1129 void (GLAPIENTRYP VertexP3uiv)( GLenum type, const GLuint *value);
1130
1131 void (GLAPIENTRYP VertexP4ui)( GLenum type, GLuint value );
1132 void (GLAPIENTRYP VertexP4uiv)( GLenum type, const GLuint *value);
1133
1134 void (GLAPIENTRYP TexCoordP1ui)( GLenum type, GLuint coords );
1135 void (GLAPIENTRYP TexCoordP1uiv)( GLenum type, const GLuint *coords );
1136
1137 void (GLAPIENTRYP TexCoordP2ui)( GLenum type, GLuint coords );
1138 void (GLAPIENTRYP TexCoordP2uiv)( GLenum type, const GLuint *coords );
1139
1140 void (GLAPIENTRYP TexCoordP3ui)( GLenum type, GLuint coords );
1141 void (GLAPIENTRYP TexCoordP3uiv)( GLenum type, const GLuint *coords );
1142
1143 void (GLAPIENTRYP TexCoordP4ui)( GLenum type, GLuint coords );
1144 void (GLAPIENTRYP TexCoordP4uiv)( GLenum type, const GLuint *coords );
1145
1146 void (GLAPIENTRYP MultiTexCoordP1ui)( GLenum texture, GLenum type, GLuint coords );
1147 void (GLAPIENTRYP MultiTexCoordP1uiv)( GLenum texture, GLenum type, const GLuint *coords );
1148 void (GLAPIENTRYP MultiTexCoordP2ui)( GLenum texture, GLenum type, GLuint coords );
1149 void (GLAPIENTRYP MultiTexCoordP2uiv)( GLenum texture, GLenum type, const GLuint *coords );
1150 void (GLAPIENTRYP MultiTexCoordP3ui)( GLenum texture, GLenum type, GLuint coords );
1151 void (GLAPIENTRYP MultiTexCoordP3uiv)( GLenum texture, GLenum type, const GLuint *coords );
1152 void (GLAPIENTRYP MultiTexCoordP4ui)( GLenum texture, GLenum type, GLuint coords );
1153 void (GLAPIENTRYP MultiTexCoordP4uiv)( GLenum texture, GLenum type, const GLuint *coords );
1154
1155 void (GLAPIENTRYP NormalP3ui)( GLenum type, GLuint coords );
1156 void (GLAPIENTRYP NormalP3uiv)( GLenum type, const GLuint *coords );
1157
1158 void (GLAPIENTRYP ColorP3ui)( GLenum type, GLuint color );
1159 void (GLAPIENTRYP ColorP3uiv)( GLenum type, const GLuint *color );
1160
1161 void (GLAPIENTRYP ColorP4ui)( GLenum type, GLuint color );
1162 void (GLAPIENTRYP ColorP4uiv)( GLenum type, const GLuint *color );
1163
1164 void (GLAPIENTRYP SecondaryColorP3ui)( GLenum type, GLuint color );
1165 void (GLAPIENTRYP SecondaryColorP3uiv)( GLenum type, const GLuint *color );
1166
1167 void (GLAPIENTRYP VertexAttribP1ui)( GLuint index, GLenum type,
1168 GLboolean normalized, GLuint value);
1169 void (GLAPIENTRYP VertexAttribP2ui)( GLuint index, GLenum type,
1170 GLboolean normalized, GLuint value);
1171 void (GLAPIENTRYP VertexAttribP3ui)( GLuint index, GLenum type,
1172 GLboolean normalized, GLuint value);
1173 void (GLAPIENTRYP VertexAttribP4ui)( GLuint index, GLenum type,
1174 GLboolean normalized, GLuint value);
1175 void (GLAPIENTRYP VertexAttribP1uiv)( GLuint index, GLenum type,
1176 GLboolean normalized,
1177 const GLuint *value);
1178 void (GLAPIENTRYP VertexAttribP2uiv)( GLuint index, GLenum type,
1179 GLboolean normalized,
1180 const GLuint *value);
1181 void (GLAPIENTRYP VertexAttribP3uiv)( GLuint index, GLenum type,
1182 GLboolean normalized,
1183 const GLuint *value);
1184 void (GLAPIENTRYP VertexAttribP4uiv)( GLuint index, GLenum type,
1185 GLboolean normalized,
1186 const GLuint *value);
1187
1188 /* GL_ARB_vertex_attrib_64bit / GL 4.1 */
1189 void (GLAPIENTRYP VertexAttribL1d)( GLuint index, GLdouble x);
1190 void (GLAPIENTRYP VertexAttribL2d)( GLuint index, GLdouble x, GLdouble y);
1191 void (GLAPIENTRYP VertexAttribL3d)( GLuint index, GLdouble x, GLdouble y, GLdouble z);
1192 void (GLAPIENTRYP VertexAttribL4d)( GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1193
1194
1195 void (GLAPIENTRYP VertexAttribL1dv)( GLuint index, const GLdouble *v);
1196 void (GLAPIENTRYP VertexAttribL2dv)( GLuint index, const GLdouble *v);
1197 void (GLAPIENTRYP VertexAttribL3dv)( GLuint index, const GLdouble *v);
1198 void (GLAPIENTRYP VertexAttribL4dv)( GLuint index, const GLdouble *v);
1199
1200 } GLvertexformat;
1201
1202
1203 #endif /* DD_INCLUDED */