3 * Device driver interfaces.
7 * Mesa 3-D graphics library
10 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
19 * The above copyright notice and this permission notice shall be included
20 * in all copies or substantial portions of the Software.
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
26 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
27 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 /* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */
36 struct gl_pixelstore_attrib
;
37 struct mesa_display_list
;
40 * Device driver function table.
41 * Core Mesa uses these function pointers to call into device drivers.
42 * Most of these functions directly correspond to OpenGL state commands.
43 * Core Mesa will call these functions after error checking has been done
44 * so that the drivers don't have to worry about error testing.
46 * Vertex transformation/clipping/lighting is patched into the T&L module.
47 * Rasterization functions are patched into the swrast module.
49 * Note: when new functions are added here, the drivers/common/driverfuncs.c
50 * file should be updated too!!!
52 struct dd_function_table
{
54 * Return a string as needed by glGetString().
55 * Only the GL_RENDERER query must be implemented. Otherwise, NULL can be
58 const GLubyte
* (*GetString
)( GLcontext
*ctx
, GLenum name
);
61 * Notify the driver after Mesa has made some internal state changes.
63 * This is in addition to any state change callbacks Mesa may already have
66 void (*UpdateState
)( GLcontext
*ctx
, GLbitfield new_state
);
69 * Get the width and height of the named buffer/window.
71 * Mesa uses this to determine when the driver's window size has changed.
72 * XXX OBSOLETE: this function will be removed in the future.
74 void (*GetBufferSize
)( GLframebuffer
*buffer
,
75 GLuint
*width
, GLuint
*height
);
78 * Resize the given framebuffer to the given size.
79 * XXX OBSOLETE: this function will be removed in the future.
81 void (*ResizeBuffers
)( GLcontext
*ctx
, GLframebuffer
*fb
,
82 GLuint width
, GLuint height
);
85 * Called whenever an error is generated.
86 * __GLcontextRec::ErrorValue contains the error value.
88 void (*Error
)( GLcontext
*ctx
);
91 * This is called whenever glFinish() is called.
93 void (*Finish
)( GLcontext
*ctx
);
96 * This is called whenever glFlush() is called.
98 void (*Flush
)( GLcontext
*ctx
);
101 * Clear the color/depth/stencil/accum buffer(s).
102 * \param buffers a bitmask of BUFFER_BIT_* flags indicating which
103 * renderbuffers need to be cleared.
105 void (*Clear
)( GLcontext
*ctx
, GLbitfield buffers
);
108 * Execute glAccum command.
110 void (*Accum
)( GLcontext
*ctx
, GLenum op
, GLfloat value
);
114 * Execute glRasterPos, updating the ctx->Current.Raster fields
116 void (*RasterPos
)( GLcontext
*ctx
, const GLfloat v
[4] );
119 * \name Image-related functions
124 * Called by glDrawPixels().
125 * \p unpack describes how to unpack the source image data.
127 void (*DrawPixels
)( GLcontext
*ctx
,
128 GLint x
, GLint y
, GLsizei width
, GLsizei height
,
129 GLenum format
, GLenum type
,
130 const struct gl_pixelstore_attrib
*unpack
,
131 const GLvoid
*pixels
);
134 * Called by glReadPixels().
136 void (*ReadPixels
)( GLcontext
*ctx
,
137 GLint x
, GLint y
, GLsizei width
, GLsizei height
,
138 GLenum format
, GLenum type
,
139 const struct gl_pixelstore_attrib
*unpack
,
143 * Called by glCopyPixels().
145 void (*CopyPixels
)( GLcontext
*ctx
, GLint srcx
, GLint srcy
,
146 GLsizei width
, GLsizei height
,
147 GLint dstx
, GLint dsty
, GLenum type
);
150 * Called by glBitmap().
152 void (*Bitmap
)( GLcontext
*ctx
,
153 GLint x
, GLint y
, GLsizei width
, GLsizei height
,
154 const struct gl_pixelstore_attrib
*unpack
,
155 const GLubyte
*bitmap
);
160 * \name Texture image functions
165 * Choose texture format.
167 * This is called by the \c _mesa_store_tex[sub]image[123]d() fallback
168 * functions. The driver should examine \p internalFormat and return a
169 * pointer to an appropriate gl_texture_format.
171 const struct gl_texture_format
*(*ChooseTextureFormat
)( GLcontext
*ctx
,
172 GLint internalFormat
, GLenum srcFormat
, GLenum srcType
);
175 * Called by glTexImage1D().
177 * \param target user specified.
178 * \param format user specified.
179 * \param type user specified.
180 * \param pixels user specified.
181 * \param packing indicates the image packing of pixels.
182 * \param texObj is the target texture object.
183 * \param texImage is the target texture image. It will have the texture \p
184 * width, \p height, \p depth, \p border and \p internalFormat information.
186 * \p retainInternalCopy is returned by this function and indicates whether
187 * core Mesa should keep an internal copy of the texture image.
189 * Drivers should call a fallback routine from texstore.c if needed.
191 void (*TexImage1D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
192 GLint internalFormat
,
193 GLint width
, GLint border
,
194 GLenum format
, GLenum type
, const GLvoid
*pixels
,
195 const struct gl_pixelstore_attrib
*packing
,
196 struct gl_texture_object
*texObj
,
197 struct gl_texture_image
*texImage
);
200 * Called by glTexImage2D().
202 * \sa dd_function_table::TexImage1D.
204 void (*TexImage2D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
205 GLint internalFormat
,
206 GLint width
, GLint height
, GLint border
,
207 GLenum format
, GLenum type
, const GLvoid
*pixels
,
208 const struct gl_pixelstore_attrib
*packing
,
209 struct gl_texture_object
*texObj
,
210 struct gl_texture_image
*texImage
);
213 * Called by glTexImage3D().
215 * \sa dd_function_table::TexImage1D.
217 void (*TexImage3D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
218 GLint internalFormat
,
219 GLint width
, GLint height
, GLint depth
, GLint border
,
220 GLenum format
, GLenum type
, const GLvoid
*pixels
,
221 const struct gl_pixelstore_attrib
*packing
,
222 struct gl_texture_object
*texObj
,
223 struct gl_texture_image
*texImage
);
226 * Called by glTexSubImage1D().
228 * \param target user specified.
229 * \param level user specified.
230 * \param xoffset user specified.
231 * \param yoffset user specified.
232 * \param zoffset user specified.
233 * \param width user specified.
234 * \param height user specified.
235 * \param depth user specified.
236 * \param format user specified.
237 * \param type user specified.
238 * \param pixels user specified.
239 * \param packing indicates the image packing of pixels.
240 * \param texObj is the target texture object.
241 * \param texImage is the target texture image. It will have the texture \p
242 * width, \p height, \p border and \p internalFormat information.
244 * The driver should use a fallback routine from texstore.c if needed.
246 void (*TexSubImage1D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
247 GLint xoffset
, GLsizei width
,
248 GLenum format
, GLenum type
,
249 const GLvoid
*pixels
,
250 const struct gl_pixelstore_attrib
*packing
,
251 struct gl_texture_object
*texObj
,
252 struct gl_texture_image
*texImage
);
255 * Called by glTexSubImage2D().
257 * \sa dd_function_table::TexSubImage1D.
259 void (*TexSubImage2D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
260 GLint xoffset
, GLint yoffset
,
261 GLsizei width
, GLsizei height
,
262 GLenum format
, GLenum type
,
263 const GLvoid
*pixels
,
264 const struct gl_pixelstore_attrib
*packing
,
265 struct gl_texture_object
*texObj
,
266 struct gl_texture_image
*texImage
);
269 * Called by glTexSubImage3D().
271 * \sa dd_function_table::TexSubImage1D.
273 void (*TexSubImage3D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
274 GLint xoffset
, GLint yoffset
, GLint zoffset
,
275 GLsizei width
, GLsizei height
, GLint depth
,
276 GLenum format
, GLenum type
,
277 const GLvoid
*pixels
,
278 const struct gl_pixelstore_attrib
*packing
,
279 struct gl_texture_object
*texObj
,
280 struct gl_texture_image
*texImage
);
283 * Called by glGetTexImage().
285 void (*GetTexImage
)( GLcontext
*ctx
, GLenum target
, GLint level
,
286 GLenum format
, GLenum type
, GLvoid
*pixels
,
287 struct gl_texture_object
*texObj
,
288 struct gl_texture_image
*texImage
);
291 * Called by glCopyTexImage1D().
293 * Drivers should use a fallback routine from texstore.c if needed.
295 void (*CopyTexImage1D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
296 GLenum internalFormat
, GLint x
, GLint y
,
297 GLsizei width
, GLint border
);
300 * Called by glCopyTexImage2D().
302 * Drivers should use a fallback routine from texstore.c if needed.
304 void (*CopyTexImage2D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
305 GLenum internalFormat
, GLint x
, GLint y
,
306 GLsizei width
, GLsizei height
, GLint border
);
309 * Called by glCopyTexSubImage1D().
311 * Drivers should use a fallback routine from texstore.c if needed.
313 void (*CopyTexSubImage1D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
315 GLint x
, GLint y
, GLsizei width
);
317 * Called by glCopyTexSubImage2D().
319 * Drivers should use a fallback routine from texstore.c if needed.
321 void (*CopyTexSubImage2D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
322 GLint xoffset
, GLint yoffset
,
324 GLsizei width
, GLsizei height
);
326 * Called by glCopyTexSubImage3D().
328 * Drivers should use a fallback routine from texstore.c if needed.
330 void (*CopyTexSubImage3D
)( GLcontext
*ctx
, GLenum target
, GLint level
,
331 GLint xoffset
, GLint yoffset
, GLint zoffset
,
333 GLsizei width
, GLsizei height
);
336 * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
338 void (*GenerateMipmap
)(GLcontext
*ctx
, GLenum target
,
339 struct gl_texture_object
*texObj
);
342 * Called by glTexImage[123]D when user specifies a proxy texture
345 * \return GL_TRUE if the proxy test passes, or GL_FALSE if the test fails.
347 GLboolean (*TestProxyTexImage
)(GLcontext
*ctx
, GLenum target
,
348 GLint level
, GLint internalFormat
,
349 GLenum format
, GLenum type
,
350 GLint width
, GLint height
,
351 GLint depth
, GLint border
);
356 * \name Compressed texture functions
361 * Called by glCompressedTexImage1D().
363 * \param target user specified.
364 * \param format user specified.
365 * \param type user specified.
366 * \param pixels user specified.
367 * \param packing indicates the image packing of pixels.
368 * \param texObj is the target texture object.
369 * \param texImage is the target texture image. It will have the texture \p
370 * width, \p height, \p depth, \p border and \p internalFormat information.
372 * \a retainInternalCopy is returned by this function and indicates whether
373 * core Mesa should keep an internal copy of the texture image.
375 void (*CompressedTexImage1D
)( GLcontext
*ctx
, GLenum target
,
376 GLint level
, GLint internalFormat
,
377 GLsizei width
, GLint border
,
378 GLsizei imageSize
, const GLvoid
*data
,
379 struct gl_texture_object
*texObj
,
380 struct gl_texture_image
*texImage
);
382 * Called by glCompressedTexImage2D().
384 * \sa dd_function_table::CompressedTexImage1D.
386 void (*CompressedTexImage2D
)( GLcontext
*ctx
, GLenum target
,
387 GLint level
, GLint internalFormat
,
388 GLsizei width
, GLsizei height
, GLint border
,
389 GLsizei imageSize
, const GLvoid
*data
,
390 struct gl_texture_object
*texObj
,
391 struct gl_texture_image
*texImage
);
393 * Called by glCompressedTexImage3D().
395 * \sa dd_function_table::CompressedTexImage3D.
397 void (*CompressedTexImage3D
)( GLcontext
*ctx
, GLenum target
,
398 GLint level
, GLint internalFormat
,
399 GLsizei width
, GLsizei height
, GLsizei depth
,
401 GLsizei imageSize
, const GLvoid
*data
,
402 struct gl_texture_object
*texObj
,
403 struct gl_texture_image
*texImage
);
406 * Called by glCompressedTexSubImage1D().
408 * \param target user specified.
409 * \param level user specified.
410 * \param xoffset user specified.
411 * \param yoffset user specified.
412 * \param zoffset user specified.
413 * \param width user specified.
414 * \param height user specified.
415 * \param depth user specified.
416 * \param imageSize user specified.
417 * \param data user specified.
418 * \param texObj is the target texture object.
419 * \param texImage is the target texture image. It will have the texture \p
420 * width, \p height, \p depth, \p border and \p internalFormat information.
422 void (*CompressedTexSubImage1D
)(GLcontext
*ctx
, GLenum target
, GLint level
,
423 GLint xoffset
, GLsizei width
,
425 GLsizei imageSize
, const GLvoid
*data
,
426 struct gl_texture_object
*texObj
,
427 struct gl_texture_image
*texImage
);
429 * Called by glCompressedTexSubImage2D().
431 * \sa dd_function_table::CompressedTexImage3D.
433 void (*CompressedTexSubImage2D
)(GLcontext
*ctx
, GLenum target
, GLint level
,
434 GLint xoffset
, GLint yoffset
,
435 GLsizei width
, GLint height
,
437 GLsizei imageSize
, const GLvoid
*data
,
438 struct gl_texture_object
*texObj
,
439 struct gl_texture_image
*texImage
);
441 * Called by glCompressedTexSubImage3D().
443 * \sa dd_function_table::CompressedTexImage3D.
445 void (*CompressedTexSubImage3D
)(GLcontext
*ctx
, GLenum target
, GLint level
,
446 GLint xoffset
, GLint yoffset
, GLint zoffset
,
447 GLsizei width
, GLint height
, GLint depth
,
449 GLsizei imageSize
, const GLvoid
*data
,
450 struct gl_texture_object
*texObj
,
451 struct gl_texture_image
*texImage
);
455 * Called by glGetCompressedTexImage.
457 void (*GetCompressedTexImage
)(GLcontext
*ctx
, GLenum target
, GLint level
,
459 struct gl_texture_object
*texObj
,
460 struct gl_texture_image
*texImage
);
463 * Called to query number of bytes of storage needed to store the
464 * specified compressed texture.
466 GLuint (*CompressedTextureSize
)( GLcontext
*ctx
, GLsizei width
,
467 GLsizei height
, GLsizei depth
,
472 * \name Texture object functions
477 * Called by glBindTexture().
479 void (*BindTexture
)( GLcontext
*ctx
, GLenum target
,
480 struct gl_texture_object
*tObj
);
483 * Called to allocate a new texture object.
484 * A new gl_texture_object should be returned. The driver should
485 * attach to it any device-specific info it needs.
487 struct gl_texture_object
* (*NewTextureObject
)( GLcontext
*ctx
, GLuint name
,
490 * Called when a texture object is about to be deallocated.
492 * Driver should delete the gl_texture_object object and anything
495 void (*DeleteTexture
)( GLcontext
*ctx
, struct gl_texture_object
*tObj
);
498 * Called to allocate a new texture image object.
500 struct gl_texture_image
* (*NewTextureImage
)( GLcontext
*ctx
);
503 * Called to free tImage->Data.
505 void (*FreeTexImageData
)( GLcontext
*ctx
, struct gl_texture_image
*tImage
);
507 /** Map texture image data into user space */
508 void (*MapTexture
)( GLcontext
*ctx
, struct gl_texture_object
*tObj
);
509 /** Unmap texture images from user space */
510 void (*UnmapTexture
)( GLcontext
*ctx
, struct gl_texture_object
*tObj
);
513 * Note: no context argument. This function doesn't initially look
514 * like it belongs here, except that the driver is the only entity
515 * that knows for sure how the texture memory is allocated - via
516 * the above callbacks. There is then an argument that the driver
517 * knows what memcpy paths might be fast. Typically this is invoked with
519 * to -- a pointer into texture memory allocated by NewTextureImage() above.
520 * from -- a pointer into client memory or a mesa temporary.
521 * sz -- nr bytes to copy.
523 void* (*TextureMemCpy
)( void *to
, const void *from
, size_t sz
);
526 * Called by glAreTextureResident().
528 GLboolean (*IsTextureResident
)( GLcontext
*ctx
,
529 struct gl_texture_object
*t
);
532 * Called by glPrioritizeTextures().
534 void (*PrioritizeTexture
)( GLcontext
*ctx
, struct gl_texture_object
*t
,
538 * Called by glActiveTextureARB() to set current texture unit.
540 void (*ActiveTexture
)( GLcontext
*ctx
, GLuint texUnitNumber
);
543 * Called when the texture's color lookup table is changed.
545 * If \p tObj is NULL then the shared texture palette
546 * gl_texture_object::Palette is to be updated.
548 void (*UpdateTexturePalette
)( GLcontext
*ctx
,
549 struct gl_texture_object
*tObj
);
554 * \name Imaging functionality
557 void (*CopyColorTable
)( GLcontext
*ctx
,
558 GLenum target
, GLenum internalformat
,
559 GLint x
, GLint y
, GLsizei width
);
561 void (*CopyColorSubTable
)( GLcontext
*ctx
,
562 GLenum target
, GLsizei start
,
563 GLint x
, GLint y
, GLsizei width
);
565 void (*CopyConvolutionFilter1D
)( GLcontext
*ctx
, GLenum target
,
566 GLenum internalFormat
,
567 GLint x
, GLint y
, GLsizei width
);
569 void (*CopyConvolutionFilter2D
)( GLcontext
*ctx
, GLenum target
,
570 GLenum internalFormat
,
572 GLsizei width
, GLsizei height
);
577 * \name Vertex/fragment program functions
580 /** Bind a vertex/fragment program */
581 void (*BindProgram
)(GLcontext
*ctx
, GLenum target
, struct gl_program
*prog
);
582 /** Allocate a new program */
583 struct gl_program
* (*NewProgram
)(GLcontext
*ctx
, GLenum target
, GLuint id
);
584 /** Delete a program */
585 void (*DeleteProgram
)(GLcontext
*ctx
, struct gl_program
*prog
);
586 /** Notify driver that a program string has been specified. */
587 void (*ProgramStringNotify
)(GLcontext
*ctx
, GLenum target
,
588 struct gl_program
*prog
);
589 /** Get value of a program register during program execution. */
590 void (*GetProgramRegister
)(GLcontext
*ctx
, enum register_file file
,
591 GLuint index
, GLfloat val
[4]);
593 /** Query if program can be loaded onto hardware */
594 GLboolean (*IsProgramNative
)(GLcontext
*ctx
, GLenum target
,
595 struct gl_program
*prog
);
601 * \name State-changing functions.
603 * \note drawing functions are above.
605 * These functions are called by their corresponding OpenGL API functions.
606 * They are \e also called by the gl_PopAttrib() function!!!
607 * May add more functions like these to the device driver in the future.
610 /** Specify the alpha test function */
611 void (*AlphaFunc
)(GLcontext
*ctx
, GLenum func
, GLfloat ref
);
612 /** Set the blend color */
613 void (*BlendColor
)(GLcontext
*ctx
, const GLfloat color
[4]);
614 /** Set the blend equation */
615 void (*BlendEquationSeparate
)(GLcontext
*ctx
, GLenum modeRGB
, GLenum modeA
);
616 /** Specify pixel arithmetic */
617 void (*BlendFuncSeparate
)(GLcontext
*ctx
,
618 GLenum sfactorRGB
, GLenum dfactorRGB
,
619 GLenum sfactorA
, GLenum dfactorA
);
620 /** Specify clear values for the color buffers */
621 void (*ClearColor
)(GLcontext
*ctx
, const GLfloat color
[4]);
622 /** Specify the clear value for the depth buffer */
623 void (*ClearDepth
)(GLcontext
*ctx
, GLclampd d
);
624 /** Specify the clear value for the color index buffers */
625 void (*ClearIndex
)(GLcontext
*ctx
, GLuint index
);
626 /** Specify the clear value for the stencil buffer */
627 void (*ClearStencil
)(GLcontext
*ctx
, GLint s
);
628 /** Specify a plane against which all geometry is clipped */
629 void (*ClipPlane
)(GLcontext
*ctx
, GLenum plane
, const GLfloat
*equation
);
630 /** Enable and disable writing of frame buffer color components */
631 void (*ColorMask
)(GLcontext
*ctx
, GLboolean rmask
, GLboolean gmask
,
632 GLboolean bmask
, GLboolean amask
);
633 /** Cause a material color to track the current color */
634 void (*ColorMaterial
)(GLcontext
*ctx
, GLenum face
, GLenum mode
);
635 /** Specify whether front- or back-facing facets can be culled */
636 void (*CullFace
)(GLcontext
*ctx
, GLenum mode
);
637 /** Define front- and back-facing polygons */
638 void (*FrontFace
)(GLcontext
*ctx
, GLenum mode
);
639 /** Specify the value used for depth buffer comparisons */
640 void (*DepthFunc
)(GLcontext
*ctx
, GLenum func
);
641 /** Enable or disable writing into the depth buffer */
642 void (*DepthMask
)(GLcontext
*ctx
, GLboolean flag
);
643 /** Specify mapping of depth values from NDC to window coordinates */
644 void (*DepthRange
)(GLcontext
*ctx
, GLclampd nearval
, GLclampd farval
);
645 /** Specify the current buffer for writing */
646 void (*DrawBuffer
)( GLcontext
*ctx
, GLenum buffer
);
647 /** Specify the buffers for writing for fragment programs*/
648 void (*DrawBuffers
)( GLcontext
*ctx
, GLsizei n
, const GLenum
*buffers
);
649 /** Enable or disable server-side gl capabilities */
650 void (*Enable
)(GLcontext
*ctx
, GLenum cap
, GLboolean state
);
651 /** Specify fog parameters */
652 void (*Fogfv
)(GLcontext
*ctx
, GLenum pname
, const GLfloat
*params
);
653 /** Specify implementation-specific hints */
654 void (*Hint
)(GLcontext
*ctx
, GLenum target
, GLenum mode
);
655 /** Control the writing of individual bits in the color index buffers */
656 void (*IndexMask
)(GLcontext
*ctx
, GLuint mask
);
657 /** Set light source parameters.
658 * Note: for GL_POSITION and GL_SPOT_DIRECTION, params will have already
659 * been transformed to eye-space.
661 void (*Lightfv
)(GLcontext
*ctx
, GLenum light
,
662 GLenum pname
, const GLfloat
*params
);
663 /** Set the lighting model parameters */
664 void (*LightModelfv
)(GLcontext
*ctx
, GLenum pname
, const GLfloat
*params
);
665 /** Specify the line stipple pattern */
666 void (*LineStipple
)(GLcontext
*ctx
, GLint factor
, GLushort pattern
);
667 /** Specify the width of rasterized lines */
668 void (*LineWidth
)(GLcontext
*ctx
, GLfloat width
);
669 /** Specify a logical pixel operation for color index rendering */
670 void (*LogicOpcode
)(GLcontext
*ctx
, GLenum opcode
);
671 void (*PointParameterfv
)(GLcontext
*ctx
, GLenum pname
,
672 const GLfloat
*params
);
673 /** Specify the diameter of rasterized points */
674 void (*PointSize
)(GLcontext
*ctx
, GLfloat size
);
675 /** Select a polygon rasterization mode */
676 void (*PolygonMode
)(GLcontext
*ctx
, GLenum face
, GLenum mode
);
677 /** Set the scale and units used to calculate depth values */
678 void (*PolygonOffset
)(GLcontext
*ctx
, GLfloat factor
, GLfloat units
);
679 /** Set the polygon stippling pattern */
680 void (*PolygonStipple
)(GLcontext
*ctx
, const GLubyte
*mask
);
681 /* Specifies the current buffer for reading */
682 void (*ReadBuffer
)( GLcontext
*ctx
, GLenum buffer
);
683 /** Set rasterization mode */
684 void (*RenderMode
)(GLcontext
*ctx
, GLenum mode
);
685 /** Define the scissor box */
686 void (*Scissor
)(GLcontext
*ctx
, GLint x
, GLint y
, GLsizei w
, GLsizei h
);
687 /** Select flat or smooth shading */
688 void (*ShadeModel
)(GLcontext
*ctx
, GLenum mode
);
689 /** OpenGL 2.0 two-sided StencilFunc */
690 void (*StencilFuncSeparate
)(GLcontext
*ctx
, GLenum face
, GLenum func
,
691 GLint ref
, GLuint mask
);
692 /** OpenGL 2.0 two-sided StencilMask */
693 void (*StencilMaskSeparate
)(GLcontext
*ctx
, GLenum face
, GLuint mask
);
694 /** OpenGL 2.0 two-sided StencilOp */
695 void (*StencilOpSeparate
)(GLcontext
*ctx
, GLenum face
, GLenum fail
,
696 GLenum zfail
, GLenum zpass
);
697 /** Control the generation of texture coordinates */
698 void (*TexGen
)(GLcontext
*ctx
, GLenum coord
, GLenum pname
,
699 const GLfloat
*params
);
700 /** Set texture environment parameters */
701 void (*TexEnv
)(GLcontext
*ctx
, GLenum target
, GLenum pname
,
702 const GLfloat
*param
);
703 /** Set texture parameters */
704 void (*TexParameter
)(GLcontext
*ctx
, GLenum target
,
705 struct gl_texture_object
*texObj
,
706 GLenum pname
, const GLfloat
*params
);
707 void (*TextureMatrix
)(GLcontext
*ctx
, GLuint unit
, const GLmatrix
*mat
);
708 /** Set the viewport */
709 void (*Viewport
)(GLcontext
*ctx
, GLint x
, GLint y
, GLsizei w
, GLsizei h
);
714 * \name Vertex array functions
716 * Called by the corresponding OpenGL functions.
719 void (*VertexPointer
)(GLcontext
*ctx
, GLint size
, GLenum type
,
720 GLsizei stride
, const GLvoid
*ptr
);
721 void (*NormalPointer
)(GLcontext
*ctx
, GLenum type
,
722 GLsizei stride
, const GLvoid
*ptr
);
723 void (*ColorPointer
)(GLcontext
*ctx
, GLint size
, GLenum type
,
724 GLsizei stride
, const GLvoid
*ptr
);
725 void (*FogCoordPointer
)(GLcontext
*ctx
, GLenum type
,
726 GLsizei stride
, const GLvoid
*ptr
);
727 void (*IndexPointer
)(GLcontext
*ctx
, GLenum type
,
728 GLsizei stride
, const GLvoid
*ptr
);
729 void (*SecondaryColorPointer
)(GLcontext
*ctx
, GLint size
, GLenum type
,
730 GLsizei stride
, const GLvoid
*ptr
);
731 void (*TexCoordPointer
)(GLcontext
*ctx
, GLint size
, GLenum type
,
732 GLsizei stride
, const GLvoid
*ptr
);
733 void (*EdgeFlagPointer
)(GLcontext
*ctx
, GLsizei stride
, const GLvoid
*ptr
);
734 void (*VertexAttribPointer
)(GLcontext
*ctx
, GLuint index
, GLint size
,
735 GLenum type
, GLsizei stride
, const GLvoid
*ptr
);
736 void (*LockArraysEXT
)( GLcontext
*ctx
, GLint first
, GLsizei count
);
737 void (*UnlockArraysEXT
)( GLcontext
*ctx
);
742 * \name State-query functions
744 * Return GL_TRUE if query was completed, GL_FALSE otherwise.
747 /** Return the value or values of a selected parameter */
748 GLboolean (*GetBooleanv
)(GLcontext
*ctx
, GLenum pname
, GLboolean
*result
);
749 /** Return the value or values of a selected parameter */
750 GLboolean (*GetDoublev
)(GLcontext
*ctx
, GLenum pname
, GLdouble
*result
);
751 /** Return the value or values of a selected parameter */
752 GLboolean (*GetFloatv
)(GLcontext
*ctx
, GLenum pname
, GLfloat
*result
);
753 /** Return the value or values of a selected parameter */
754 GLboolean (*GetIntegerv
)(GLcontext
*ctx
, GLenum pname
, GLint
*result
);
755 /** Return the value or values of a selected parameter */
756 GLboolean (*GetPointerv
)(GLcontext
*ctx
, GLenum pname
, GLvoid
**result
);
761 * \name Vertex/pixel buffer object functions
763 #if FEATURE_ARB_vertex_buffer_object
765 void (*BindBuffer
)( GLcontext
*ctx
, GLenum target
,
766 struct gl_buffer_object
*obj
);
768 struct gl_buffer_object
* (*NewBufferObject
)( GLcontext
*ctx
, GLuint buffer
,
771 void (*DeleteBuffer
)( GLcontext
*ctx
, struct gl_buffer_object
*obj
);
773 void (*BufferData
)( GLcontext
*ctx
, GLenum target
, GLsizeiptrARB size
,
774 const GLvoid
*data
, GLenum usage
,
775 struct gl_buffer_object
*obj
);
777 void (*BufferSubData
)( GLcontext
*ctx
, GLenum target
, GLintptrARB offset
,
778 GLsizeiptrARB size
, const GLvoid
*data
,
779 struct gl_buffer_object
*obj
);
781 void (*GetBufferSubData
)( GLcontext
*ctx
, GLenum target
,
782 GLintptrARB offset
, GLsizeiptrARB size
,
783 GLvoid
*data
, struct gl_buffer_object
*obj
);
785 void * (*MapBuffer
)( GLcontext
*ctx
, GLenum target
, GLenum access
,
786 struct gl_buffer_object
*obj
);
788 GLboolean (*UnmapBuffer
)( GLcontext
*ctx
, GLenum target
,
789 struct gl_buffer_object
*obj
);
794 * \name Functions for GL_EXT_framebuffer_object
796 #if FEATURE_EXT_framebuffer_object
798 struct gl_framebuffer
* (*NewFramebuffer
)(GLcontext
*ctx
, GLuint name
);
799 struct gl_renderbuffer
* (*NewRenderbuffer
)(GLcontext
*ctx
, GLuint name
);
800 void (*BindFramebuffer
)(GLcontext
*ctx
, GLenum target
,
801 struct gl_framebuffer
*fb
, struct gl_framebuffer
*fbread
);
802 void (*FramebufferRenderbuffer
)(GLcontext
*ctx
,
803 struct gl_framebuffer
*fb
,
805 struct gl_renderbuffer
*rb
);
806 void (*RenderTexture
)(GLcontext
*ctx
,
807 struct gl_framebuffer
*fb
,
808 struct gl_renderbuffer_attachment
*att
);
809 void (*FinishRenderTexture
)(GLcontext
*ctx
,
810 struct gl_renderbuffer_attachment
*att
);
813 #if FEATURE_EXT_framebuffer_blit
814 void (*BlitFramebuffer
)(GLcontext
*ctx
,
815 GLint srcX0
, GLint srcY0
, GLint srcX1
, GLint srcY1
,
816 GLint dstX0
, GLint dstY0
, GLint dstX1
, GLint dstY1
,
817 GLbitfield mask
, GLenum filter
);
821 * \name Query objects
824 struct gl_query_object
* (*NewQueryObject
)(GLcontext
*ctx
, GLuint id
);
825 void (*DeleteQuery
)(GLcontext
*ctx
, struct gl_query_object
*q
);
826 void (*BeginQuery
)(GLcontext
*ctx
, struct gl_query_object
*q
);
827 void (*EndQuery
)(GLcontext
*ctx
, struct gl_query_object
*q
);
828 void (*CheckQuery
)(GLcontext
*ctx
, struct gl_query_object
*q
);
829 void (*WaitQuery
)(GLcontext
*ctx
, struct gl_query_object
*q
);
834 * \name Vertex Array objects
837 struct gl_array_object
* (*NewArrayObject
)(GLcontext
*ctx
, GLuint id
);
838 void (*DeleteArrayObject
)(GLcontext
*ctx
, struct gl_array_object
*obj
);
839 void (*BindArrayObject
)(GLcontext
*ctx
, struct gl_array_object
*obj
);
843 * \name GLSL-related functions (ARB extensions and OpenGL 2.x)
846 void (*AttachShader
)(GLcontext
*ctx
, GLuint program
, GLuint shader
);
847 void (*BindAttribLocation
)(GLcontext
*ctx
, GLuint program
, GLuint index
,
848 const GLcharARB
*name
);
849 void (*CompileShader
)(GLcontext
*ctx
, GLuint shader
);
850 GLuint (*CreateShader
)(GLcontext
*ctx
, GLenum type
);
851 GLuint (*CreateProgram
)(GLcontext
*ctx
);
852 void (*DeleteProgram2
)(GLcontext
*ctx
, GLuint program
);
853 void (*DeleteShader
)(GLcontext
*ctx
, GLuint shader
);
854 void (*DetachShader
)(GLcontext
*ctx
, GLuint program
, GLuint shader
);
855 void (*GetActiveAttrib
)(GLcontext
*ctx
, GLuint program
, GLuint index
,
856 GLsizei maxLength
, GLsizei
* length
, GLint
* size
,
857 GLenum
* type
, GLcharARB
* name
);
858 void (*GetActiveUniform
)(GLcontext
*ctx
, GLuint program
, GLuint index
,
859 GLsizei maxLength
, GLsizei
*length
, GLint
*size
,
860 GLenum
*type
, GLcharARB
*name
);
861 void (*GetAttachedShaders
)(GLcontext
*ctx
, GLuint program
, GLsizei maxCount
,
862 GLsizei
*count
, GLuint
*obj
);
863 GLint (*GetAttribLocation
)(GLcontext
*ctx
, GLuint program
,
864 const GLcharARB
*name
);
865 GLuint (*GetHandle
)(GLcontext
*ctx
, GLenum pname
);
866 void (*GetProgramiv
)(GLcontext
*ctx
, GLuint program
,
867 GLenum pname
, GLint
*params
);
868 void (*GetProgramInfoLog
)(GLcontext
*ctx
, GLuint program
, GLsizei bufSize
,
869 GLsizei
*length
, GLchar
*infoLog
);
870 void (*GetShaderiv
)(GLcontext
*ctx
, GLuint shader
,
871 GLenum pname
, GLint
*params
);
872 void (*GetShaderInfoLog
)(GLcontext
*ctx
, GLuint shader
, GLsizei bufSize
,
873 GLsizei
*length
, GLchar
*infoLog
);
874 void (*GetShaderSource
)(GLcontext
*ctx
, GLuint shader
, GLsizei maxLength
,
875 GLsizei
*length
, GLcharARB
*sourceOut
);
876 void (*GetUniformfv
)(GLcontext
*ctx
, GLuint program
, GLint location
,
878 void (*GetUniformiv
)(GLcontext
*ctx
, GLuint program
, GLint location
,
880 GLint (*GetUniformLocation
)(GLcontext
*ctx
, GLuint program
,
881 const GLcharARB
*name
);
882 GLboolean (*IsProgram
)(GLcontext
*ctx
, GLuint name
);
883 GLboolean (*IsShader
)(GLcontext
*ctx
, GLuint name
);
884 void (*LinkProgram
)(GLcontext
*ctx
, GLuint program
);
885 void (*ShaderSource
)(GLcontext
*ctx
, GLuint shader
, const GLchar
*source
);
886 void (*Uniform
)(GLcontext
*ctx
, GLint location
, GLsizei count
,
887 const GLvoid
*values
, GLenum type
);
888 void (*UniformMatrix
)(GLcontext
*ctx
, GLint cols
, GLint rows
,
889 GLenum matrixType
, GLint location
, GLsizei count
,
890 GLboolean transpose
, const GLfloat
*values
);
891 void (*UseProgram
)(GLcontext
*ctx
, GLuint program
);
892 void (*ValidateProgram
)(GLcontext
*ctx
, GLuint program
);
893 /* XXX many more to come */
898 * \name Support for multiple T&L engines
903 * Bitmask of state changes that require the current T&L module to be
904 * validated, using ValidateTnlModule() below.
909 * Validate the current T&L module.
911 * This is called directly after UpdateState() when a state change that has
912 * occurred matches the dd_function_table::NeedValidate bitmask above. This
913 * ensures all computed values are up to date, thus allowing the driver to
914 * decide if the current T&L module needs to be swapped out.
916 * This must be non-NULL if a driver installs a custom T&L module and sets
917 * the dd_function_table::NeedValidate bitmask, but may be NULL otherwise.
919 void (*ValidateTnlModule
)( GLcontext
*ctx
, GLuint new_state
);
922 #define PRIM_OUTSIDE_BEGIN_END (GL_POLYGON+1)
923 #define PRIM_INSIDE_UNKNOWN_PRIM (GL_POLYGON+2)
924 #define PRIM_UNKNOWN (GL_POLYGON+3)
927 * Set by the driver-supplied T&L engine.
929 * Set to PRIM_OUTSIDE_BEGIN_END when outside glBegin()/glEnd().
931 GLuint CurrentExecPrimitive
;
934 * Current state of an in-progress compilation.
936 * May take on any of the additional values PRIM_OUTSIDE_BEGIN_END,
937 * PRIM_INSIDE_UNKNOWN_PRIM or PRIM_UNKNOWN defined above.
939 GLuint CurrentSavePrimitive
;
942 #define FLUSH_STORED_VERTICES 0x1
943 #define FLUSH_UPDATE_CURRENT 0x2
945 * Set by the driver-supplied T&L engine whenever vertices are buffered
946 * between glBegin()/glEnd() objects or __GLcontextRec::Current is not
949 * The dd_function_table::FlushVertices call below may be used to resolve
953 GLuint SaveNeedFlush
;
956 * If inside glBegin()/glEnd(), it should ASSERT(0). Otherwise, if
957 * FLUSH_STORED_VERTICES bit in \p flags is set flushes any buffered
958 * vertices, if FLUSH_UPDATE_CURRENT bit is set updates
959 * __GLcontextRec::Current and gl_light_attrib::Material
961 * Note that the default T&L engine never clears the
962 * FLUSH_UPDATE_CURRENT bit, even after performing the update.
964 void (*FlushVertices
)( GLcontext
*ctx
, GLuint flags
);
965 void (*SaveFlushVertices
)( GLcontext
*ctx
);
968 * Give the driver the opportunity to hook in its own vtxfmt for
969 * compiling optimized display lists. This is called on each valid
970 * glBegin() during list compilation.
972 GLboolean (*NotifySaveBegin
)( GLcontext
*ctx
, GLenum mode
);
975 * Notify driver that the special derived value _NeedEyeCoords has
978 void (*LightingSpaceChange
)( GLcontext
*ctx
);
981 * Called by glNewList().
983 * Let the T&L component know what is going on with display lists
984 * in time to make changes to dispatch tables, etc.
986 void (*NewList
)( GLcontext
*ctx
, GLuint list
, GLenum mode
);
988 * Called by glEndList().
990 * \sa dd_function_table::NewList.
992 void (*EndList
)( GLcontext
*ctx
);
995 * Called by glCallList(s).
997 * Notify the T&L component before and after calling a display list.
999 void (*BeginCallList
)( GLcontext
*ctx
,
1000 struct mesa_display_list
*dlist
);
1002 * Called by glEndCallList().
1004 * \sa dd_function_table::BeginCallList.
1006 void (*EndCallList
)( GLcontext
*ctx
);
1012 * Transform/Clip/Lighting interface
1014 * Drivers present a reduced set of the functions possible in
1015 * glBegin()/glEnd() objects. Core mesa provides translation stubs for the
1016 * remaining functions to map down to these entry points.
1018 * These are the initial values to be installed into dispatch by
1019 * mesa. If the T&L driver wants to modify the dispatch table
1020 * while installed, it must do so itself. It would be possible for
1021 * the vertexformat to install it's own initial values for these
1022 * functions, but this way there is an obvious list of what is
1023 * expected of the driver.
1025 * If the driver wants to hook in entry points other than those
1026 * listed, it must restore them to their original values in
1027 * the disable() callback, below.
1034 void (GLAPIENTRYP ArrayElement
)( GLint
); /* NOTE */
1035 void (GLAPIENTRYP Color3f
)( GLfloat
, GLfloat
, GLfloat
);
1036 void (GLAPIENTRYP Color3fv
)( const GLfloat
* );
1037 void (GLAPIENTRYP Color4f
)( GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1038 void (GLAPIENTRYP Color4fv
)( const GLfloat
* );
1039 void (GLAPIENTRYP EdgeFlag
)( GLboolean
);
1040 void (GLAPIENTRYP EvalCoord1f
)( GLfloat
); /* NOTE */
1041 void (GLAPIENTRYP EvalCoord1fv
)( const GLfloat
* ); /* NOTE */
1042 void (GLAPIENTRYP EvalCoord2f
)( GLfloat
, GLfloat
); /* NOTE */
1043 void (GLAPIENTRYP EvalCoord2fv
)( const GLfloat
* ); /* NOTE */
1044 void (GLAPIENTRYP EvalPoint1
)( GLint
); /* NOTE */
1045 void (GLAPIENTRYP EvalPoint2
)( GLint
, GLint
); /* NOTE */
1046 void (GLAPIENTRYP FogCoordfEXT
)( GLfloat
);
1047 void (GLAPIENTRYP FogCoordfvEXT
)( const GLfloat
* );
1048 void (GLAPIENTRYP Indexf
)( GLfloat
);
1049 void (GLAPIENTRYP Indexfv
)( const GLfloat
* );
1050 void (GLAPIENTRYP Materialfv
)( GLenum face
, GLenum pname
, const GLfloat
* ); /* NOTE */
1051 void (GLAPIENTRYP MultiTexCoord1fARB
)( GLenum
, GLfloat
);
1052 void (GLAPIENTRYP MultiTexCoord1fvARB
)( GLenum
, const GLfloat
* );
1053 void (GLAPIENTRYP MultiTexCoord2fARB
)( GLenum
, GLfloat
, GLfloat
);
1054 void (GLAPIENTRYP MultiTexCoord2fvARB
)( GLenum
, const GLfloat
* );
1055 void (GLAPIENTRYP MultiTexCoord3fARB
)( GLenum
, GLfloat
, GLfloat
, GLfloat
);
1056 void (GLAPIENTRYP MultiTexCoord3fvARB
)( GLenum
, const GLfloat
* );
1057 void (GLAPIENTRYP MultiTexCoord4fARB
)( GLenum
, GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1058 void (GLAPIENTRYP MultiTexCoord4fvARB
)( GLenum
, const GLfloat
* );
1059 void (GLAPIENTRYP Normal3f
)( GLfloat
, GLfloat
, GLfloat
);
1060 void (GLAPIENTRYP Normal3fv
)( const GLfloat
* );
1061 void (GLAPIENTRYP SecondaryColor3fEXT
)( GLfloat
, GLfloat
, GLfloat
);
1062 void (GLAPIENTRYP SecondaryColor3fvEXT
)( const GLfloat
* );
1063 void (GLAPIENTRYP TexCoord1f
)( GLfloat
);
1064 void (GLAPIENTRYP TexCoord1fv
)( const GLfloat
* );
1065 void (GLAPIENTRYP TexCoord2f
)( GLfloat
, GLfloat
);
1066 void (GLAPIENTRYP TexCoord2fv
)( const GLfloat
* );
1067 void (GLAPIENTRYP TexCoord3f
)( GLfloat
, GLfloat
, GLfloat
);
1068 void (GLAPIENTRYP TexCoord3fv
)( const GLfloat
* );
1069 void (GLAPIENTRYP TexCoord4f
)( GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1070 void (GLAPIENTRYP TexCoord4fv
)( const GLfloat
* );
1071 void (GLAPIENTRYP Vertex2f
)( GLfloat
, GLfloat
);
1072 void (GLAPIENTRYP Vertex2fv
)( const GLfloat
* );
1073 void (GLAPIENTRYP Vertex3f
)( GLfloat
, GLfloat
, GLfloat
);
1074 void (GLAPIENTRYP Vertex3fv
)( const GLfloat
* );
1075 void (GLAPIENTRYP Vertex4f
)( GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1076 void (GLAPIENTRYP Vertex4fv
)( const GLfloat
* );
1077 void (GLAPIENTRYP CallList
)( GLuint
); /* NOTE */
1078 void (GLAPIENTRYP CallLists
)( GLsizei
, GLenum
, const GLvoid
* ); /* NOTE */
1079 void (GLAPIENTRYP Begin
)( GLenum
);
1080 void (GLAPIENTRYP End
)( void );
1081 /* GL_NV_vertex_program */
1082 void (GLAPIENTRYP VertexAttrib1fNV
)( GLuint index
, GLfloat x
);
1083 void (GLAPIENTRYP VertexAttrib1fvNV
)( GLuint index
, const GLfloat
*v
);
1084 void (GLAPIENTRYP VertexAttrib2fNV
)( GLuint index
, GLfloat x
, GLfloat y
);
1085 void (GLAPIENTRYP VertexAttrib2fvNV
)( GLuint index
, const GLfloat
*v
);
1086 void (GLAPIENTRYP VertexAttrib3fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
);
1087 void (GLAPIENTRYP VertexAttrib3fvNV
)( GLuint index
, const GLfloat
*v
);
1088 void (GLAPIENTRYP VertexAttrib4fNV
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
);
1089 void (GLAPIENTRYP VertexAttrib4fvNV
)( GLuint index
, const GLfloat
*v
);
1090 #if FEATURE_ARB_vertex_program
1091 void (GLAPIENTRYP VertexAttrib1fARB
)( GLuint index
, GLfloat x
);
1092 void (GLAPIENTRYP VertexAttrib1fvARB
)( GLuint index
, const GLfloat
*v
);
1093 void (GLAPIENTRYP VertexAttrib2fARB
)( GLuint index
, GLfloat x
, GLfloat y
);
1094 void (GLAPIENTRYP VertexAttrib2fvARB
)( GLuint index
, const GLfloat
*v
);
1095 void (GLAPIENTRYP VertexAttrib3fARB
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
);
1096 void (GLAPIENTRYP VertexAttrib3fvARB
)( GLuint index
, const GLfloat
*v
);
1097 void (GLAPIENTRYP VertexAttrib4fARB
)( GLuint index
, GLfloat x
, GLfloat y
, GLfloat z
, GLfloat w
);
1098 void (GLAPIENTRYP VertexAttrib4fvARB
)( GLuint index
, const GLfloat
*v
);
1104 void (GLAPIENTRYP Rectf
)( GLfloat
, GLfloat
, GLfloat
, GLfloat
);
1110 void (GLAPIENTRYP DrawArrays
)( GLenum mode
, GLint start
, GLsizei count
);
1111 void (GLAPIENTRYP DrawElements
)( GLenum mode
, GLsizei count
, GLenum type
,
1112 const GLvoid
*indices
);
1113 void (GLAPIENTRYP DrawRangeElements
)( GLenum mode
, GLuint start
,
1114 GLuint end
, GLsizei count
,
1115 GLenum type
, const GLvoid
*indices
);
1121 * If you don't support eval, fallback to the default vertex format
1122 * on receiving an eval call and use the pipeline mechanism to
1123 * provide partial T&L acceleration.
1125 * Mesa will provide a set of helper functions to do eval within
1126 * accelerated vertex formats, eventually...
1129 void (GLAPIENTRYP EvalMesh1
)( GLenum mode
, GLint i1
, GLint i2
);
1130 void (GLAPIENTRYP EvalMesh2
)( GLenum mode
, GLint i1
, GLint i2
, GLint j1
, GLint j2
);
1136 #endif /* DD_INCLUDED */