3 * \brief Define replacements for some X data types and define the DRI-related
6 * \note Cut down version of glxclient.h.
15 typedef struct __DRIscreenRec __DRIscreen
; /**< \copydoc __DRIscreenRec */
16 typedef struct __DRIcontextRec __DRIcontext
; /**< \copydoc __DRIcontextRec */
17 typedef struct __DRIdrawableRec __DRIdrawable
; /**< \copydoc __DRIdrawableRec */
20 * \brief Screen dependent methods.
22 * This structure is initialized during the MiniGLXDisplayRec::createScreen
25 struct __DRIscreenRec
{
27 * \brief Method to destroy the private DRI screen data.
29 void (*destroyScreen
)(__DRIscreen
*screen
);
32 * \brief Method to create the private DRI context data and initialize the
33 * context dependent methods.
35 void *(*createContext
)(__DRIscreen
*screen
, const __GLcontextModes
*glVisual
,
38 * \brief Method to create the private DRI drawable data and initialize the
39 * drawable dependent methods.
41 void *(*createDrawable
)(__DRIscreen
*screen
,
42 int width
, int height
, int index
,
43 const __GLcontextModes
*glVisual
);
46 * XXX in the future, implement this:
47 void *(*createPBuffer)(Display *dpy, int scrn, GLXPbuffer pbuffer,
48 GLXFBConfig config, __DRIdrawable *pdraw);
52 * \brief Opaque pointer to private per screen direct rendering data.
54 * \c NULL if direct rendering is not supported on this screen. Never
55 * dereferenced in libGL.
60 * \brief Context dependent methods.
62 * This structure is initialized during the __DRIscreenRec::createContext call.
64 struct __DRIcontextRec
{
66 * \brief Method to destroy the private DRI context data.
68 void (*destroyContext
)(__DRIcontext
*context
);
71 * \brief Method to bind a DRI drawable to a DRI graphics context.
73 * \todo XXX in the future, also pass a 'read' GLXDrawable for
74 * glXMakeCurrentReadSGI() and GLX 1.3's glXMakeContextCurrent().
76 GLboolean (*bindContext
)(__DRIscreen
*screen
, __DRIdrawable
*drawable
, __DRIcontext
*context
);
79 * \brief Method to unbind a DRI drawable to a DRI graphics context.
81 GLboolean (*unbindContext
)(__DRIdrawable
*drawable
, __DRIcontext
*context
);
83 * \brief Opaque pointer to private per context direct rendering data.
85 * NULL if direct rendering is not supported on the display or
86 * screen used to create this context. Never dereferenced in libGL.
91 * \brief Drawable dependent methods.
93 * This structure is initialized during the __DRIscreenRec::createDrawable call.
95 * __DRIscreenRec::createDrawable is not called by libGL at this time. It's
96 * currently used via the dri_util.c utility code instead.
98 struct __DRIdrawableRec
{
100 * \brief Method to destroy the private DRI drawable data.
102 void (*destroyDrawable
)(__DRIdrawable
*drawable
);
106 * \brief Method to swap the front and back buffers.
108 void (*swapBuffers
)(__DRIdrawable
*drawable
);
111 * \brief Opaque pointer to private per drawable direct rendering data.
113 * \c NULL if direct rendering is not supported on the display or
114 * screen used to create this drawable. Never dereferenced in libGL.
118 typedef void *(driCreateScreenFunc
)(struct DRIDriverRec
*driver
,
119 struct DRIDriverContextRec
*driverContext
);
121 /** This must be implemented in each driver */
122 extern driCreateScreenFunc __driCreateScreen
;