glxapi.c File Reference

Include dependency graph for glxapi.c:

Go to the source code of this file.

Data Structures

struct  display_dispatch
struct  name_address_pair

Defines

#define GET_DISPATCH(DPY, TABLE)

Functions

struct _glxapi_table_real_GetGLXDispatchTable (void)
struct _glxapi_table_mesa_GetGLXDispatchTable (void)
static struct _glxapi_tableget_dispatch (Display *dpy)
static void SetCurrentContext (GLXContext c)
XVisualInfo PUBLIC * glXChooseVisual (Display *dpy, int screen, int *list)
void PUBLIC glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, unsigned long mask)
GLXContext PUBLIC glXCreateContext (Display *dpy, XVisualInfo *visinfo, GLXContext shareList, Bool direct)
GLXPixmap PUBLIC glXCreateGLXPixmap (Display *dpy, XVisualInfo *visinfo, Pixmap pixmap)
void PUBLIC glXDestroyContext (Display *dpy, GLXContext ctx)
void PUBLIC glXDestroyGLXPixmap (Display *dpy, GLXPixmap pixmap)
int PUBLIC glXGetConfig (Display *dpy, XVisualInfo *visinfo, int attrib, int *value)
GLXContext PUBLIC glXGetCurrentContext (void)
GLXDrawable PUBLIC glXGetCurrentDrawable (void)
Bool PUBLIC glXIsDirect (Display *dpy, GLXContext ctx)
Bool PUBLIC glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx)
Bool PUBLIC glXQueryExtension (Display *dpy, int *errorb, int *event)
Bool PUBLIC glXQueryVersion (Display *dpy, int *maj, int *min)
void PUBLIC glXSwapBuffers (Display *dpy, GLXDrawable drawable)
void PUBLIC glXUseXFont (Font font, int first, int count, int listBase)
void PUBLIC glXWaitGL (void)
void PUBLIC glXWaitX (void)
const char PUBLIC * glXGetClientString (Display *dpy, int name)
const char PUBLIC * glXQueryExtensionsString (Display *dpy, int screen)
const char PUBLIC * glXQueryServerString (Display *dpy, int screen, int name)
Display PUBLIC * glXGetCurrentDisplay (void)
GLXFBConfig PUBLIC * glXChooseFBConfig (Display *dpy, int screen, const int *attribList, int *nitems)
GLXContext PUBLIC glXCreateNewContext (Display *dpy, GLXFBConfig config, int renderType, GLXContext shareList, Bool direct)
GLXPbuffer PUBLIC glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attribList)
GLXPixmap PUBLIC glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attribList)
GLXWindow PUBLIC glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attribList)
void PUBLIC glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf)
void PUBLIC glXDestroyPixmap (Display *dpy, GLXPixmap pixmap)
void PUBLIC glXDestroyWindow (Display *dpy, GLXWindow window)
GLXDrawable PUBLIC glXGetCurrentReadDrawable (void)
int PUBLIC glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value)
GLXFBConfig PUBLIC * glXGetFBConfigs (Display *dpy, int screen, int *nelements)
void PUBLIC glXGetSelectedEvent (Display *dpy, GLXDrawable drawable, unsigned long *mask)
XVisualInfo PUBLIC * glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config)
Bool PUBLIC glXMakeContextCurrent (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
int PUBLIC glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value)
void PUBLIC glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value)
void PUBLIC glXSelectEvent (Display *dpy, GLXDrawable drawable, unsigned long mask)
int PUBLIC glXSwapIntervalSGI (int interval)
int PUBLIC glXGetVideoSyncSGI (unsigned int *count)
int PUBLIC glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int *count)
Bool PUBLIC glXMakeCurrentReadSGI (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
GLXDrawable PUBLIC glXGetCurrentReadDrawableSGI (void)
void PUBLIC glXFreeContextEXT (Display *dpy, GLXContext context)
GLXContextID PUBLIC glXGetContextIDEXT (const GLXContext context)
Display PUBLIC * glXGetCurrentDisplayEXT (void)
GLXContext PUBLIC glXImportContextEXT (Display *dpy, GLXContextID contextID)
int PUBLIC glXQueryContextInfoEXT (Display *dpy, GLXContext context, int attribute, int *value)
int PUBLIC glXGetFBConfigAttribSGIX (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value)
GLXFBConfigSGIX PUBLIC * glXChooseFBConfigSGIX (Display *dpy, int screen, int *attrib_list, int *nelements)
GLXPixmap PUBLIC glXCreateGLXPixmapWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap)
GLXContext PUBLIC glXCreateContextWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct)
XVisualInfo PUBLIC * glXGetVisualFromFBConfigSGIX (Display *dpy, GLXFBConfigSGIX config)
GLXFBConfigSGIX PUBLIC glXGetFBConfigFromVisualSGIX (Display *dpy, XVisualInfo *vis)
GLXPbufferSGIX PUBLIC glXCreateGLXPbufferSGIX (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list)
void PUBLIC glXDestroyGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf)
int PUBLIC glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value)
void PUBLIC glXSelectEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long mask)
void PUBLIC glXGetSelectedEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long *mask)
void PUBLIC glXCushionSGI (Display *dpy, Window win, float cushion)
int PUBLIC glXBindChannelToWindowSGIX (Display *dpy, int screen, int channel, Window window)
int PUBLIC glXChannelRectSGIX (Display *dpy, int screen, int channel, int x, int y, int w, int h)
int PUBLIC glXQueryChannelRectSGIX (Display *dpy, int screen, int channel, int *x, int *y, int *w, int *h)
int PUBLIC glXQueryChannelDeltasSGIX (Display *dpy, int screen, int channel, int *dx, int *dy, int *dw, int *dh)
int PUBLIC glXChannelRectSyncSGIX (Display *dpy, int screen, int channel, GLenum synctype)
void PUBLIC glXJoinSwapGroupSGIX (Display *dpy, GLXDrawable drawable, GLXDrawable member)
void PUBLIC glXBindSwapBarrierSGIX (Display *dpy, GLXDrawable drawable, int barrier)
Bool PUBLIC glXQueryMaxSwapBarriersSGIX (Display *dpy, int screen, int *max)
Status PUBLIC glXGetTransparentIndexSUN (Display *dpy, Window overlay, Window underlay, long *pTransparent)
void PUBLIC glXCopySubBufferMESA (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height)
Bool PUBLIC glXReleaseBuffersMESA (Display *dpy, Window w)
GLXPixmap PUBLIC glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visinfo, Pixmap pixmap, Colormap cmap)
Bool PUBLIC glXSet3DfxModeMESA (int mode)
void PUBLIC * glXAllocateMemoryNV (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority)
void PUBLIC glXFreeMemoryNV (GLvoid *pointer)
GLuint PUBLIC glXGetAGPOffsetMESA (const GLvoid *pointer)
void * glXAllocateMemoryMESA (Display *dpy, int scrn, size_t size, float readfreq, float writefreq, float priority)
void glXFreeMemoryMESA (Display *dpy, int scrn, void *pointer)
GLuint glXGetMemoryOffsetMESA (Display *dpy, int scrn, const void *pointer)
void glXBindTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list)
void glXReleaseTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer)
const char * _glxapi_get_version (void)
const char ** _glxapi_get_extensions (void)
GLuint _glxapi_get_dispatch_table_size (void)
static int generic_no_op_func (void)
void _glxapi_set_no_op_table (struct _glxapi_table *t)
__GLXextFuncPtr _glxapi_get_proc_address (const char *funcName)
__GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName)
void(*)() glXGetProcAddress (const GLubyte *procName)

Variables

static struct display_dispatchDispatchList = NULL
static Display * prevDisplay = NULL
static struct _glxapi_tableprevTable = NULL
pipe_tsd ContextTSD
 GLX API current context.
static struct name_address_pair GLX_functions []


Define Documentation

#define GET_DISPATCH ( DPY,
TABLE   ) 

Value:

if (DPY == prevDisplay) {               \
      TABLE = prevTable;                \
   }                                    \
   else if (!DPY) {                     \
      TABLE = NULL;                     \
   }                                    \
   else {                               \
      TABLE = get_dispatch(DPY);        \
   }

Definition at line 114 of file glxapi.c.


Function Documentation

GLuint _glxapi_get_dispatch_table_size ( void   ) 

Definition at line 1167 of file glxapi.c.

01168 {
01169    return sizeof(struct _glxapi_table) / sizeof(void *);
01170 }

const char** _glxapi_get_extensions ( void   ) 

Definition at line 1127 of file glxapi.c.

01128 {
01129    static const char *extensions[] = {
01130 #ifdef GLX_EXT_import_context
01131       "GLX_EXT_import_context",
01132 #endif
01133 #ifdef GLX_SGI_video_sync
01134       "GLX_SGI_video_sync",
01135 #endif
01136 #ifdef GLX_MESA_copy_sub_buffer
01137       "GLX_MESA_copy_sub_buffer",
01138 #endif
01139 #ifdef GLX_MESA_release_buffers
01140       "GLX_MESA_release_buffers",
01141 #endif
01142 #ifdef GLX_MESA_pixmap_colormap
01143       "GLX_MESA_pixmap_colormap",
01144 #endif
01145 #ifdef GLX_MESA_set_3dfx_mode
01146       "GLX_MESA_set_3dfx_mode",
01147 #endif
01148 #ifdef GLX_SGIX_fbconfig
01149       "GLX_SGIX_fbconfig",
01150 #endif
01151 #ifdef GLX_SGIX_pbuffer
01152       "GLX_SGIX_pbuffer",
01153 #endif
01154 #ifdef GLX_EXT_texture_from_pixmap
01155       "GLX_EXT_texture_from_pixmap",
01156 #endif
01157       NULL
01158    };
01159    return extensions;
01160 }

__GLXextFuncPtr _glxapi_get_proc_address ( const char *  funcName  ) 

Definition at line 1355 of file glxapi.c.

References name_address_pair::Address, and name_address_pair::Name.

01356 {
01357    GLuint i;
01358    for (i = 0; GLX_functions[i].Name; i++) {
01359       if (strcmp(GLX_functions[i].Name, funcName) == 0)
01360          return GLX_functions[i].Address;
01361    }
01362    return NULL;
01363 }

const char* _glxapi_get_version ( void   ) 

Definition at line 1117 of file glxapi.c.

01118 {
01119    return "1.3";
01120 }

void _glxapi_set_no_op_table ( struct _glxapi_table t  ) 

Definition at line 1184 of file glxapi.c.

References _glxapi_get_dispatch_table_size(), and generic_no_op_func().

01185 {
01186    typedef int (*nop_func)(void);
01187    nop_func *dispatch = (nop_func *) t;
01188    GLuint n = _glxapi_get_dispatch_table_size();
01189    GLuint i;
01190    for (i = 0; i < n; i++) {
01191       dispatch[i] = generic_no_op_func;
01192    }
01193 }

struct _glxapi_table* _mesa_GetGLXDispatchTable ( void   )  [read]

struct _glxapi_table* _real_GetGLXDispatchTable ( void   )  [read]

Definition at line 34 of file realglx.c.

00035 {
00036    static struct _glxapi_table glx;
00037 
00038    /* be sure our dispatch table size <= libGL's table */
00039    {
00040       GLuint size = sizeof(struct _glxapi_table) / sizeof(void *);
00041       (void) size;
00042       assert(_glxapi_get_dispatch_table_size() >= size);
00043    }
00044 
00045    /* initialize the whole table to no-ops */
00046    _glxapi_set_no_op_table(&glx);
00047 
00048    /* now initialize the table with the functions I implement */
00049 
00050    /*** GLX_VERSION_1_0 ***/
00051    glx.ChooseVisual = _real_glXChooseVisual;
00052    glx.CopyContext = _real_glXCopyContext;
00053    glx.CreateContext = _real_glXCreateContext;
00054    glx.CreateGLXPixmap = _real_glXCreateGLXPixmap;
00055    glx.DestroyContext = _real_glXDestroyContext;
00056    glx.DestroyGLXPixmap = _real_glXDestroyGLXPixmap;
00057    glx.GetConfig = _real_glXGetConfig;
00058    /*glx.GetCurrentContext = _real_glXGetCurrentContext;*/
00059    /*glx.GetCurrentDrawable = _real_glXGetCurrentDrawable;*/
00060    glx.IsDirect = _real_glXIsDirect;
00061    glx.MakeCurrent = _real_glXMakeCurrent;
00062    glx.QueryExtension = _real_glXQueryExtension;
00063    glx.QueryVersion = _real_glXQueryVersion;
00064    glx.SwapBuffers = _real_glXSwapBuffers;
00065    glx.UseXFont = _real_glXUseXFont;
00066    glx.WaitGL = _real_glXWaitGL;
00067    glx.WaitX = _real_glXWaitX;
00068 
00069    /*** GLX_VERSION_1_1 ***/
00070    glx.GetClientString = _real_glXGetClientString;
00071    glx.QueryExtensionsString = _real_glXQueryExtensionsString;
00072    glx.QueryServerString = _real_glXQueryServerString;
00073 
00074    /*** GLX_VERSION_1_2 ***/
00075    /*glx.GetCurrentDisplay = _real_glXGetCurrentDisplay;*/
00076 
00077    /*** GLX_VERSION_1_3 ***/
00078    glx.ChooseFBConfig = _real_glXChooseFBConfig;
00079    glx.CreateNewContext = _real_glXCreateNewContext;
00080    glx.CreatePbuffer = _real_glXCreatePbuffer;
00081    glx.CreatePixmap = _real_glXCreatePixmap;
00082    glx.CreateWindow = _real_glXCreateWindow;
00083    glx.DestroyPbuffer = _real_glXDestroyPbuffer;
00084    glx.DestroyPixmap = _real_glXDestroyPixmap;
00085    glx.DestroyWindow = _real_glXDestroyWindow;
00086    /*glx.GetCurrentReadDrawable = _real_glXGetCurrentReadDrawable;*/
00087    glx.GetFBConfigAttrib = _real_glXGetFBConfigAttrib;
00088    glx.GetFBConfigs = _real_glXGetFBConfigs;
00089    glx.GetSelectedEvent = _real_glXGetSelectedEvent;
00090    glx.GetVisualFromFBConfig = _real_glXGetVisualFromFBConfig;
00091    glx.MakeContextCurrent = _real_glXMakeContextCurrent;
00092    glx.QueryContext = _real_glXQueryContext;
00093    glx.QueryDrawable = _real_glXQueryDrawable;
00094    glx.SelectEvent = _real_glXSelectEvent;
00095 
00096    /*** GLX_SGI_swap_control ***/
00097    glx.SwapIntervalSGI = _real_glXSwapIntervalSGI;
00098 
00099    /*** GLX_SGI_video_sync ***/
00100    glx.GetVideoSyncSGI = _real_glXGetVideoSyncSGI;
00101    glx.WaitVideoSyncSGI = _real_glXWaitVideoSyncSGI;
00102 
00103    /*** GLX_SGI_make_current_read ***/
00104    glx.MakeCurrentReadSGI = _real_glXMakeCurrentReadSGI;
00105    /*glx.GetCurrentReadDrawableSGI = _real_glXGetCurrentReadDrawableSGI;*/
00106 
00107 #if defined(_VL_H)
00108    /*** GLX_SGIX_video_source ***/
00109    glx.CreateGLXVideoSourceSGIX = _real_glXCreateGLXVideoSourceSGIX;
00110    glx.DestroyGLXVideoSourceSGIX = _real_glXDestroyGLXVideoSourceSGIX;
00111 #endif
00112 
00113    /*** GLX_EXT_import_context ***/
00114    glx.FreeContextEXT = _real_glXFreeContextEXT;
00115    /*glx.GetContextIDEXT = _real_glXGetContextIDEXT;*/
00116    /*glx.GetCurrentDisplayEXT = _real_glXGetCurrentDisplayEXT;*/
00117    glx.ImportContextEXT = _real_glXImportContextEXT;
00118    glx.QueryContextInfoEXT = _real_glXQueryContextInfoEXT;
00119 
00120    /*** GLX_SGIX_fbconfig ***/
00121    glx.GetFBConfigAttribSGIX = _real_glXGetFBConfigAttribSGIX;
00122    glx.ChooseFBConfigSGIX = _real_glXChooseFBConfigSGIX;
00123    glx.CreateGLXPixmapWithConfigSGIX = _real_glXCreateGLXPixmapWithConfigSGIX;
00124    glx.CreateContextWithConfigSGIX = _real_glXCreateContextWithConfigSGIX;
00125    glx.GetVisualFromFBConfigSGIX = _real_glXGetVisualFromFBConfigSGIX;
00126    glx.GetFBConfigFromVisualSGIX = _real_glXGetFBConfigFromVisualSGIX;
00127 
00128    /*** GLX_SGIX_pbuffer ***/
00129    glx.CreateGLXPbufferSGIX = _real_glXCreateGLXPbufferSGIX;
00130    glx.DestroyGLXPbufferSGIX = _real_glXDestroyGLXPbufferSGIX;
00131    glx.QueryGLXPbufferSGIX = _real_glXQueryGLXPbufferSGIX;
00132    glx.SelectEventSGIX = _real_glXSelectEventSGIX;
00133    glx.GetSelectedEventSGIX = _real_glXGetSelectedEventSGIX;
00134 
00135    /*** GLX_SGI_cushion ***/
00136    glx.CushionSGI = _real_glXCushionSGI;
00137 
00138    /*** GLX_SGIX_video_resize ***/
00139    glx.BindChannelToWindowSGIX = _real_glXBindChannelToWindowSGIX;
00140    glx.ChannelRectSGIX = _real_glXChannelRectSGIX;
00141    glx.QueryChannelRectSGIX = _real_glXQueryChannelRectSGIX;
00142    glx.QueryChannelDeltasSGIX = _real_glXQueryChannelDeltasSGIX;
00143    glx.ChannelRectSyncSGIX = _real_glXChannelRectSyncSGIX;
00144 
00145 #if defined(_DM_BUFFER_H_)
00146    /*** (GLX_SGIX_dmbuffer ***/
00147    glx.AssociateDMPbufferSGIX = NULL;
00148 #endif
00149 
00150    /*** GLX_SGIX_swap_group ***/
00151    glx.JoinSwapGroupSGIX = _real_glXJoinSwapGroupSGIX;
00152 
00153    /*** GLX_SGIX_swap_barrier ***/
00154    glx.BindSwapBarrierSGIX = _real_glXBindSwapBarrierSGIX;
00155    glx.QueryMaxSwapBarriersSGIX = _real_glXQueryMaxSwapBarriersSGIX;
00156 
00157    /*** GLX_SUN_get_transparent_index ***/
00158    glx.GetTransparentIndexSUN = _real_glXGetTransparentIndexSUN;
00159 
00160    /*** GLX_MESA_copy_sub_buffer ***/
00161    glx.CopySubBufferMESA = _real_glXCopySubBufferMESA;
00162 
00163    /*** GLX_MESA_release_buffers ***/
00164    glx.ReleaseBuffersMESA = _real_glXReleaseBuffersMESA;
00165 
00166    /*** GLX_MESA_pixmap_colormap ***/
00167    glx.CreateGLXPixmapMESA = _real_glXCreateGLXPixmapMESA;
00168 
00169    /*** GLX_MESA_set_3dfx_mode ***/
00170    glx.Set3DfxModeMESA = _real_glXSet3DfxModeMESA;
00171 
00172    /*** GLX_NV_vertex_array_range ***/
00173    glx.AllocateMemoryNV = _real_glXAllocateMemoryNV;
00174    glx.FreeMemoryNV = _real_glXFreeMemoryNV;
00175 
00176    /*** GLX_MESA_agp_offset ***/
00177    glx.GetAGPOffsetMESA = _real_glXGetAGPOffsetMESA;
00178 
00179    return &glx;
00180 }

static int generic_no_op_func ( void   )  [static]

Definition at line 1174 of file glxapi.c.

01175 {
01176    return 0;
01177 }

static struct _glxapi_table* get_dispatch ( Display *  dpy  )  [static, read]

Definition at line 62 of file glxapi.c.

References _mesa_GetGLXDispatchTable(), display_dispatch::Dpy, display_dispatch::Next, prevDisplay, and display_dispatch::Table.

00063 {
00064    if (!dpy)
00065       return NULL;
00066 
00067    /* search list of display/dispatch pairs for this display */
00068    {
00069       const struct display_dispatch *d = DispatchList;
00070       while (d) {
00071          if (d->Dpy == dpy) {
00072             prevDisplay = dpy;
00073             prevTable = d->Table;
00074             return d->Table;  /* done! */
00075          }
00076          d = d->Next;
00077       }
00078    }
00079 
00080    /* A new display, determine if we should use real GLX
00081     * or Mesa's pseudo-GLX.
00082     */
00083    {
00084       struct _glxapi_table *t = _mesa_GetGLXDispatchTable();
00085 
00086       if (t) {
00087          struct display_dispatch *d;
00088          d = (struct display_dispatch *) malloc(sizeof(struct display_dispatch));
00089          if (d) {
00090             d->Dpy = dpy;
00091             d->Table = t;
00092             /* insert at head of list */
00093             d->Next = DispatchList;
00094             DispatchList = d;
00095             /* update cache */
00096             prevDisplay = dpy;
00097             prevTable = t;
00098             return t;
00099          }
00100       }
00101    }
00102 
00103    /* If we get here that means we can't use real GLX on this display
00104     * and the Mesa pseudo-GLX software renderer wasn't compiled in.
00105     * Or, we ran out of memory!
00106     */
00107    return NULL;
00108 }

void* glXAllocateMemoryMESA ( Display *  dpy,
int  scrn,
size_t  size,
float  readfreq,
float  writefreq,
float  priority 
)

Definition at line 1067 of file glxapi.c.

01069 {
01070    /* dummy */
01071    return NULL;
01072 }

void PUBLIC* glXAllocateMemoryNV ( GLsizei  size,
GLfloat  readFrequency,
GLfloat  writeFrequency,
GLfloat  priority 
)

Definition at line 1022 of file glxapi.c.

References _glxapi_table::AllocateMemoryNV, GET_DISPATCH, and glXGetCurrentDisplay().

01026 {
01027    struct _glxapi_table *t;
01028    Display *dpy = glXGetCurrentDisplay();
01029    GET_DISPATCH(dpy, t);
01030    if (!t)
01031       return NULL;
01032    return (t->AllocateMemoryNV)(size, readFrequency, writeFrequency, priority);
01033 }

int PUBLIC glXBindChannelToWindowSGIX ( Display *  dpy,
int  screen,
int  channel,
Window  window 
)

Definition at line 845 of file glxapi.c.

References _glxapi_table::BindChannelToWindowSGIX, and GET_DISPATCH.

00846 {
00847    struct _glxapi_table *t;
00848    GET_DISPATCH(dpy, t);
00849    if (!t)
00850       return 0;
00851    return (t->BindChannelToWindowSGIX)(dpy, screen, channel, window);
00852 }

void PUBLIC glXBindSwapBarrierSGIX ( Display *  dpy,
GLXDrawable  drawable,
int  barrier 
)

Definition at line 927 of file glxapi.c.

References _glxapi_table::BindSwapBarrierSGIX, and GET_DISPATCH.

00928 {
00929    struct _glxapi_table *t;
00930    GET_DISPATCH(dpy, t);
00931    if (!t)
00932       return;
00933    (*t->BindSwapBarrierSGIX)(dpy, drawable, barrier);
00934 }

void glXBindTexImageEXT ( Display *  dpy,
GLXDrawable  drawable,
int  buffer,
const int *  attrib_list 
)

Definition at line 1092 of file glxapi.c.

References _glxapi_table::BindTexImageEXT, and GET_DISPATCH.

01094 {
01095    struct _glxapi_table *t;
01096    GET_DISPATCH(dpy, t);
01097    if (t)
01098       t->BindTexImageEXT(dpy, drawable, buffer, attrib_list);
01099 }

int PUBLIC glXChannelRectSGIX ( Display *  dpy,
int  screen,
int  channel,
int  x,
int  y,
int  w,
int  h 
)

Definition at line 855 of file glxapi.c.

References _glxapi_table::ChannelRectSGIX, and GET_DISPATCH.

00856 {
00857    struct _glxapi_table *t;
00858    GET_DISPATCH(dpy, t);
00859    if (!t)
00860       return 0;
00861    return (t->ChannelRectSGIX)(dpy, screen, channel, x, y, w, h);
00862 }

int PUBLIC glXChannelRectSyncSGIX ( Display *  dpy,
int  screen,
int  channel,
GLenum  synctype 
)

Definition at line 885 of file glxapi.c.

References _glxapi_table::ChannelRectSyncSGIX, and GET_DISPATCH.

00886 {
00887    struct _glxapi_table *t;
00888    GET_DISPATCH(dpy, t);
00889    if (!t)
00890       return 0;
00891    return (t->ChannelRectSyncSGIX)(dpy, screen, channel, synctype);
00892 }

GLXFBConfig PUBLIC* glXChooseFBConfig ( Display *  dpy,
int  screen,
const int *  attribList,
int *  nitems 
)

Definition at line 390 of file glxapi.c.

References _glxapi_table::ChooseFBConfig, and GET_DISPATCH.

00391 {
00392    struct _glxapi_table *t;
00393    GET_DISPATCH(dpy, t);
00394    if (!t)
00395       return 0;
00396    return (t->ChooseFBConfig)(dpy, screen, attribList, nitems);
00397 }

GLXFBConfigSGIX PUBLIC* glXChooseFBConfigSGIX ( Display *  dpy,
int  screen,
int *  attrib_list,
int *  nelements 
)

Definition at line 723 of file glxapi.c.

References _glxapi_table::ChooseFBConfigSGIX, and GET_DISPATCH.

00724 {
00725    struct _glxapi_table *t;
00726    GET_DISPATCH(dpy, t);
00727    if (!t)
00728       return 0;
00729    return (t->ChooseFBConfigSGIX)(dpy, screen, attrib_list, nelements);
00730 }

XVisualInfo PUBLIC* glXChooseVisual ( Display *  dpy,
int  screen,
int *  list 
)

Definition at line 148 of file glxapi.c.

References _glxapi_table::ChooseVisual, and GET_DISPATCH.

00149 {
00150    struct _glxapi_table *t;
00151    GET_DISPATCH(dpy, t);
00152    if (!t)
00153       return NULL;
00154    return (t->ChooseVisual)(dpy, screen, list);
00155 }

void PUBLIC glXCopyContext ( Display *  dpy,
GLXContext  src,
GLXContext  dst,
unsigned long  mask 
)

Definition at line 159 of file glxapi.c.

References _glxapi_table::CopyContext, and GET_DISPATCH.

00160 {
00161    struct _glxapi_table *t;
00162    GET_DISPATCH(dpy, t);
00163    if (!t)
00164       return;
00165    (t->CopyContext)(dpy, src, dst, mask);
00166 }

void PUBLIC glXCopySubBufferMESA ( Display *  dpy,
GLXDrawable  drawable,
int  x,
int  y,
int  width,
int  height 
)

Definition at line 965 of file glxapi.c.

References _glxapi_table::CopySubBufferMESA, and GET_DISPATCH.

00966 {
00967    struct _glxapi_table *t;
00968    GET_DISPATCH(dpy, t);
00969    if (!t)
00970       return;
00971    (t->CopySubBufferMESA)(dpy, drawable, x, y, width, height);
00972 }

GLXContext PUBLIC glXCreateContext ( Display *  dpy,
XVisualInfo *  visinfo,
GLXContext  shareList,
Bool  direct 
)

Definition at line 170 of file glxapi.c.

References _glxapi_table::CreateContext, and GET_DISPATCH.

00171 {
00172    struct _glxapi_table *t;
00173    GET_DISPATCH(dpy, t);
00174    if (!t)
00175       return 0;
00176    return (t->CreateContext)(dpy, visinfo, shareList, direct);
00177 }

GLXContext PUBLIC glXCreateContextWithConfigSGIX ( Display *  dpy,
GLXFBConfigSGIX  config,
int  render_type,
GLXContext  share_list,
Bool  direct 
)

Definition at line 743 of file glxapi.c.

References _glxapi_table::CreateContextWithConfigSGIX, and GET_DISPATCH.

00744 {
00745    struct _glxapi_table *t;
00746    GET_DISPATCH(dpy, t);
00747    if (!t)
00748       return 0;
00749    return (t->CreateContextWithConfigSGIX)(dpy, config, render_type, share_list, direct);
00750 }

GLXPbufferSGIX PUBLIC glXCreateGLXPbufferSGIX ( Display *  dpy,
GLXFBConfigSGIX  config,
unsigned int  width,
unsigned int  height,
int *  attrib_list 
)

Definition at line 777 of file glxapi.c.

References _glxapi_table::CreateGLXPbufferSGIX, and GET_DISPATCH.

00778 {
00779    struct _glxapi_table *t;
00780    GET_DISPATCH(dpy, t);
00781    if (!t)
00782       return 0;
00783    return (t->CreateGLXPbufferSGIX)(dpy, config, width, height, attrib_list);
00784 }

GLXPixmap PUBLIC glXCreateGLXPixmap ( Display *  dpy,
XVisualInfo *  visinfo,
Pixmap  pixmap 
)

Definition at line 181 of file glxapi.c.

References _glxapi_table::CreateGLXPixmap, and GET_DISPATCH.

00182 {
00183    struct _glxapi_table *t;
00184    GET_DISPATCH(dpy, t);
00185    if (!t)
00186       return 0;
00187    return (t->CreateGLXPixmap)(dpy, visinfo, pixmap);
00188 }

GLXPixmap PUBLIC glXCreateGLXPixmapMESA ( Display *  dpy,
XVisualInfo *  visinfo,
Pixmap  pixmap,
Colormap  cmap 
)

Definition at line 993 of file glxapi.c.

References _glxapi_table::CreateGLXPixmapMESA, and GET_DISPATCH.

00994 {
00995    struct _glxapi_table *t;
00996    GET_DISPATCH(dpy, t);
00997    if (!t)
00998       return 0;
00999    return (t->CreateGLXPixmapMESA)(dpy, visinfo, pixmap, cmap);
01000 }

GLXPixmap PUBLIC glXCreateGLXPixmapWithConfigSGIX ( Display *  dpy,
GLXFBConfigSGIX  config,
Pixmap  pixmap 
)

Definition at line 733 of file glxapi.c.

References _glxapi_table::CreateGLXPixmapWithConfigSGIX, and GET_DISPATCH.

00734 {
00735    struct _glxapi_table *t;
00736    GET_DISPATCH(dpy, t);
00737    if (!t)
00738       return 0;
00739    return (t->CreateGLXPixmapWithConfigSGIX)(dpy, config, pixmap);
00740 }

GLXContext PUBLIC glXCreateNewContext ( Display *  dpy,
GLXFBConfig  config,
int  renderType,
GLXContext  shareList,
Bool  direct 
)

Definition at line 401 of file glxapi.c.

References _glxapi_table::CreateNewContext, and GET_DISPATCH.

00402 {
00403    struct _glxapi_table *t;
00404    GET_DISPATCH(dpy, t);
00405    if (!t)
00406       return 0;
00407    return (t->CreateNewContext)(dpy, config, renderType, shareList, direct);
00408 }

GLXPbuffer PUBLIC glXCreatePbuffer ( Display *  dpy,
GLXFBConfig  config,
const int *  attribList 
)

Definition at line 412 of file glxapi.c.

References _glxapi_table::CreatePbuffer, and GET_DISPATCH.

00413 {
00414    struct _glxapi_table *t;
00415    GET_DISPATCH(dpy, t);
00416    if (!t)
00417       return 0;
00418    return (t->CreatePbuffer)(dpy, config, attribList);
00419 }

GLXPixmap PUBLIC glXCreatePixmap ( Display *  dpy,
GLXFBConfig  config,
Pixmap  pixmap,
const int *  attribList 
)

Definition at line 423 of file glxapi.c.

References _glxapi_table::CreatePixmap, and GET_DISPATCH.

00424 {
00425    struct _glxapi_table *t;
00426    GET_DISPATCH(dpy, t);
00427    if (!t)
00428       return 0;
00429    return (t->CreatePixmap)(dpy, config, pixmap, attribList);
00430 }

GLXWindow PUBLIC glXCreateWindow ( Display *  dpy,
GLXFBConfig  config,
Window  win,
const int *  attribList 
)

Definition at line 434 of file glxapi.c.

References _glxapi_table::CreateWindow, and GET_DISPATCH.

00435 {
00436    struct _glxapi_table *t;
00437    GET_DISPATCH(dpy, t);
00438    if (!t)
00439       return 0;
00440    return (t->CreateWindow)(dpy, config, win, attribList);
00441 }

void PUBLIC glXCushionSGI ( Display *  dpy,
Window  win,
float  cushion 
)

Definition at line 831 of file glxapi.c.

References _glxapi_table::CushionSGI, and GET_DISPATCH.

00832 {
00833    struct _glxapi_table *t;
00834    GET_DISPATCH(dpy, t);
00835    if (!t)
00836       return;
00837    (t->CushionSGI)(dpy, win, cushion);
00838 }

void PUBLIC glXDestroyContext ( Display *  dpy,
GLXContext  ctx 
)

Definition at line 192 of file glxapi.c.

References _glxapi_table::DestroyContext, GET_DISPATCH, glXGetCurrentContext(), and SetCurrentContext().

00193 {
00194    struct _glxapi_table *t;
00195    GET_DISPATCH(dpy, t);
00196    if (!t)
00197       return;
00198    if (glXGetCurrentContext() == ctx)
00199       SetCurrentContext(NULL);
00200    (t->DestroyContext)(dpy, ctx);
00201 }

void PUBLIC glXDestroyGLXPbufferSGIX ( Display *  dpy,
GLXPbufferSGIX  pbuf 
)

Definition at line 787 of file glxapi.c.

References _glxapi_table::DestroyGLXPbufferSGIX, and GET_DISPATCH.

00788 {
00789    struct _glxapi_table *t;
00790    GET_DISPATCH(dpy, t);
00791    if (!t)
00792       return;
00793    (t->DestroyGLXPbufferSGIX)(dpy, pbuf);
00794 }

void PUBLIC glXDestroyGLXPixmap ( Display *  dpy,
GLXPixmap  pixmap 
)

Definition at line 205 of file glxapi.c.

References _glxapi_table::DestroyGLXPixmap, and GET_DISPATCH.

00206 {
00207    struct _glxapi_table *t;
00208    GET_DISPATCH(dpy, t);
00209    if (!t)
00210       return;
00211    (t->DestroyGLXPixmap)(dpy, pixmap);
00212 }

void PUBLIC glXDestroyPbuffer ( Display *  dpy,
GLXPbuffer  pbuf 
)

Definition at line 445 of file glxapi.c.

References _glxapi_table::DestroyPbuffer, and GET_DISPATCH.

00446 {
00447    struct _glxapi_table *t;
00448    GET_DISPATCH(dpy, t);
00449    if (!t)
00450       return;
00451    (t->DestroyPbuffer)(dpy, pbuf);
00452 }

void PUBLIC glXDestroyPixmap ( Display *  dpy,
GLXPixmap  pixmap 
)

Definition at line 456 of file glxapi.c.

References _glxapi_table::DestroyPixmap, and GET_DISPATCH.

00457 {
00458    struct _glxapi_table *t;
00459    GET_DISPATCH(dpy, t);
00460    if (!t)
00461       return;
00462    (t->DestroyPixmap)(dpy, pixmap);
00463 }

void PUBLIC glXDestroyWindow ( Display *  dpy,
GLXWindow  window 
)

Definition at line 467 of file glxapi.c.

References _glxapi_table::DestroyWindow, and GET_DISPATCH.

00468 {
00469    struct _glxapi_table *t;
00470    GET_DISPATCH(dpy, t);
00471    if (!t)
00472       return;
00473    (t->DestroyWindow)(dpy, window);
00474 }

void PUBLIC glXFreeContextEXT ( Display *  dpy,
GLXContext  context 
)

Definition at line 667 of file glxapi.c.

References _glxapi_table::FreeContextEXT, and GET_DISPATCH.

00668 {
00669    struct _glxapi_table *t;
00670    GET_DISPATCH(dpy, t);
00671    if (!t)
00672       return;
00673    (t->FreeContextEXT)(dpy, context);
00674 }

void glXFreeMemoryMESA ( Display *  dpy,
int  scrn,
void *  pointer 
)

Definition at line 1075 of file glxapi.c.

01076 {
01077    /* dummy */
01078 }

void PUBLIC glXFreeMemoryNV ( GLvoid *  pointer  ) 

Definition at line 1037 of file glxapi.c.

References _glxapi_table::FreeMemoryNV, GET_DISPATCH, and glXGetCurrentDisplay().

01038 {
01039    struct _glxapi_table *t;
01040    Display *dpy = glXGetCurrentDisplay();
01041    GET_DISPATCH(dpy, t);
01042    if (!t)
01043       return;
01044    (t->FreeMemoryNV)(pointer);
01045 }

GLuint PUBLIC glXGetAGPOffsetMESA ( const GLvoid *  pointer  ) 

Definition at line 1053 of file glxapi.c.

References GET_DISPATCH, _glxapi_table::GetAGPOffsetMESA, and glXGetCurrentDisplay().

01054 {
01055    struct _glxapi_table *t;
01056    Display *dpy = glXGetCurrentDisplay();
01057    GET_DISPATCH(dpy, t);
01058    if (!t)
01059       return ~0;
01060    return (t->GetAGPOffsetMESA)(pointer);
01061 }

const char PUBLIC* glXGetClientString ( Display *  dpy,
int  name 
)

Definition at line 342 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::GetClientString.

00343 {
00344    struct _glxapi_table *t;
00345    GET_DISPATCH(dpy, t);
00346    if (!t)
00347       return NULL;
00348    return (t->GetClientString)(dpy, name);
00349 }

int PUBLIC glXGetConfig ( Display *  dpy,
XVisualInfo *  visinfo,
int  attrib,
int *  value 
)

Definition at line 216 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::GetConfig.

00217 {
00218    struct _glxapi_table *t;
00219    GET_DISPATCH(dpy, t);
00220    if (!t)
00221       return GLX_NO_EXTENSION;
00222    return (t->GetConfig)(dpy, visinfo, attrib, value);
00223 }

GLXContextID PUBLIC glXGetContextIDEXT ( const GLXContext  context  ) 

Definition at line 677 of file glxapi.c.

00678 {
00679    return ((__GLXcontext *) context)->xid;
00680 }

GLXContext PUBLIC glXGetCurrentContext ( void   ) 

Definition at line 227 of file glxapi.c.

References pipe_tsd_get().

00228 {
00229    return (GLXContext) pipe_tsd_get(&ContextTSD);
00230 }

Display PUBLIC* glXGetCurrentDisplay ( void   ) 

Definition at line 377 of file glxapi.c.

References __GLXcontextRec::currentDpy, and glXGetCurrentContext().

00378 {
00379    /* Same code as in libGL's glxext.c */
00380    __GLXcontext *gc = (__GLXcontext *) glXGetCurrentContext();
00381    if (NULL == gc) return NULL;
00382    return gc->currentDpy;
00383 }

Display PUBLIC* glXGetCurrentDisplayEXT ( void   ) 

Definition at line 683 of file glxapi.c.

References glXGetCurrentDisplay().

00684 {
00685    return glXGetCurrentDisplay();
00686 }

GLXDrawable PUBLIC glXGetCurrentDrawable ( void   ) 

Definition at line 234 of file glxapi.c.

References __GLXcontextRec::currentDrawable, and glXGetCurrentContext().

00235 {
00236    __GLXcontext *gc = (__GLXcontext *) glXGetCurrentContext();
00237    return gc ? gc->currentDrawable : 0;
00238 }

GLXDrawable PUBLIC glXGetCurrentReadDrawable ( void   ) 

Definition at line 478 of file glxapi.c.

References __GLXcontextRec::currentReadable, and glXGetCurrentContext().

00479 {
00480    __GLXcontext *gc = (__GLXcontext *) glXGetCurrentContext();
00481    return gc ? gc->currentReadable : 0;
00482 }

GLXDrawable PUBLIC glXGetCurrentReadDrawableSGI ( void   ) 

Definition at line 633 of file glxapi.c.

References glXGetCurrentReadDrawable().

00634 {
00635    return glXGetCurrentReadDrawable();
00636 }

int PUBLIC glXGetFBConfigAttrib ( Display *  dpy,
GLXFBConfig  config,
int  attribute,
int *  value 
)

Definition at line 486 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::GetFBConfigAttrib.

00487 {
00488    struct _glxapi_table *t;
00489    GET_DISPATCH(dpy, t);
00490    if (!t)
00491       return GLX_NO_EXTENSION;
00492    return (t->GetFBConfigAttrib)(dpy, config, attribute, value);
00493 }

int PUBLIC glXGetFBConfigAttribSGIX ( Display *  dpy,
GLXFBConfigSGIX  config,
int  attribute,
int *  value 
)

Definition at line 713 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::GetFBConfigAttribSGIX.

00714 {
00715    struct _glxapi_table *t;
00716    GET_DISPATCH(dpy, t);
00717    if (!t)
00718       return 0;
00719    return (t->GetFBConfigAttribSGIX)(dpy, config, attribute, value);
00720 }

GLXFBConfigSGIX PUBLIC glXGetFBConfigFromVisualSGIX ( Display *  dpy,
XVisualInfo *  vis 
)

Definition at line 763 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::GetFBConfigFromVisualSGIX.

00764 {
00765    struct _glxapi_table *t;
00766    GET_DISPATCH(dpy, t);
00767    if (!t)
00768       return 0;
00769    return (t->GetFBConfigFromVisualSGIX)(dpy, vis);
00770 }

GLXFBConfig PUBLIC* glXGetFBConfigs ( Display *  dpy,
int  screen,
int *  nelements 
)

Definition at line 497 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::GetFBConfigs.

00498 {
00499    struct _glxapi_table *t;
00500    GET_DISPATCH(dpy, t);
00501    if (!t)
00502       return 0;
00503    return (t->GetFBConfigs)(dpy, screen, nelements);
00504 }

GLuint glXGetMemoryOffsetMESA ( Display *  dpy,
int  scrn,
const void *  pointer 
)

Definition at line 1082 of file glxapi.c.

01083 {
01084    /* dummy */
01085    return 0;
01086 }

void(*)() glXGetProcAddress ( const GLubyte *  procName  ) 

Definition at line 1387 of file glxapi.c.

References glXGetProcAddressARB().

01388 {
01389    return glXGetProcAddressARB(procName);
01390 }

__GLXextFuncPtr glXGetProcAddressARB ( const GLubyte *  procName  ) 

Definition at line 1372 of file glxapi.c.

References _glxapi_get_proc_address().

01373 {
01374    __GLXextFuncPtr f;
01375 
01376    f = _glxapi_get_proc_address((const char *) procName);
01377    if (f) {
01378       return f;
01379    }
01380 
01381    f = (__GLXextFuncPtr) _glapi_get_proc_address((const char *) procName);
01382    return f;
01383 }

void PUBLIC glXGetSelectedEvent ( Display *  dpy,
GLXDrawable  drawable,
unsigned long *  mask 
)

Definition at line 507 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::GetSelectedEvent.

00508 {
00509    struct _glxapi_table *t;
00510    GET_DISPATCH(dpy, t);
00511    if (!t)
00512       return;
00513    (t->GetSelectedEvent)(dpy, drawable, mask);
00514 }

void PUBLIC glXGetSelectedEventSGIX ( Display *  dpy,
GLXDrawable  drawable,
unsigned long *  mask 
)

Definition at line 817 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::GetSelectedEventSGIX.

00818 {
00819    struct _glxapi_table *t;
00820    GET_DISPATCH(dpy, t);
00821    if (!t)
00822       return;
00823    (t->GetSelectedEventSGIX)(dpy, drawable, mask);
00824 }

Status PUBLIC glXGetTransparentIndexSUN ( Display *  dpy,
Window  overlay,
Window  underlay,
long *  pTransparent 
)

Definition at line 951 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::GetTransparentIndexSUN.

00952 {
00953    struct _glxapi_table *t;
00954    GET_DISPATCH(dpy, t);
00955    if (!t)
00956       return False;
00957    return (*t->GetTransparentIndexSUN)(dpy, overlay, underlay, pTransparent);
00958 }

int PUBLIC glXGetVideoSyncSGI ( unsigned int *  count  ) 

Definition at line 597 of file glxapi.c.

References GET_DISPATCH, _glxapi_table::GetVideoSyncSGI, glXGetCurrentContext(), and glXGetCurrentDisplay().

00598 {
00599    struct _glxapi_table *t;
00600    Display *dpy = glXGetCurrentDisplay();
00601    GET_DISPATCH(dpy, t);
00602    if (!t || !glXGetCurrentContext())
00603       return GLX_BAD_CONTEXT;
00604    return (t->GetVideoSyncSGI)(count);
00605 }

XVisualInfo PUBLIC* glXGetVisualFromFBConfig ( Display *  dpy,
GLXFBConfig  config 
)

Definition at line 518 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::GetVisualFromFBConfig.

00519 {
00520    struct _glxapi_table *t;
00521    GET_DISPATCH(dpy, t);
00522    if (!t)
00523       return NULL;
00524    return (t->GetVisualFromFBConfig)(dpy, config);
00525 }

XVisualInfo PUBLIC* glXGetVisualFromFBConfigSGIX ( Display *  dpy,
GLXFBConfigSGIX  config 
)

Definition at line 753 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::GetVisualFromFBConfigSGIX.

00754 {
00755    struct _glxapi_table *t;
00756    GET_DISPATCH(dpy, t);
00757    if (!t)
00758       return 0;
00759    return (t->GetVisualFromFBConfigSGIX)(dpy, config);
00760 }

GLXContext PUBLIC glXImportContextEXT ( Display *  dpy,
GLXContextID  contextID 
)

Definition at line 689 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::ImportContextEXT.

00690 {
00691    struct _glxapi_table *t;
00692    GET_DISPATCH(dpy, t);
00693    if (!t)
00694       return 0;
00695    return (t->ImportContextEXT)(dpy, contextID);
00696 }

Bool PUBLIC glXIsDirect ( Display *  dpy,
GLXContext  ctx 
)

Definition at line 242 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::IsDirect.

00243 {
00244    struct _glxapi_table *t;
00245    GET_DISPATCH(dpy, t);
00246    if (!t)
00247       return False;
00248    return (t->IsDirect)(dpy, ctx);
00249 }

void PUBLIC glXJoinSwapGroupSGIX ( Display *  dpy,
GLXDrawable  drawable,
GLXDrawable  member 
)

Definition at line 914 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::JoinSwapGroupSGIX.

00915 {
00916    struct _glxapi_table *t;
00917    GET_DISPATCH(dpy, t);
00918    if (!t)
00919       return;
00920    (*t->JoinSwapGroupSGIX)(dpy, drawable, member);
00921 }

Bool PUBLIC glXMakeContextCurrent ( Display *  dpy,
GLXDrawable  draw,
GLXDrawable  read,
GLXContext  ctx 
)

Definition at line 529 of file glxapi.c.

References GET_DISPATCH, _glxapi_table::MakeContextCurrent, and SetCurrentContext().

00530 {
00531    Bool b;
00532    struct _glxapi_table *t;
00533    GET_DISPATCH(dpy, t);
00534    if (!t)
00535       return False;
00536    b = (t->MakeContextCurrent)(dpy, draw, read, ctx);
00537    if (b) {
00538       SetCurrentContext(ctx);
00539    }
00540    return b;
00541 }

Bool PUBLIC glXMakeCurrent ( Display *  dpy,
GLXDrawable  drawable,
GLXContext  ctx 
)

Definition at line 253 of file glxapi.c.

References GET_DISPATCH, _glxapi_table::MakeCurrent, and SetCurrentContext().

00254 {
00255    Bool b;
00256    struct _glxapi_table *t;
00257    GET_DISPATCH(dpy, t);
00258    if (!t) {
00259       return False;
00260    }
00261    b = (*t->MakeCurrent)(dpy, drawable, ctx);
00262    if (b) {
00263       SetCurrentContext(ctx);
00264    }
00265    return b;
00266 }

Bool PUBLIC glXMakeCurrentReadSGI ( Display *  dpy,
GLXDrawable  draw,
GLXDrawable  read,
GLXContext  ctx 
)

Definition at line 623 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::MakeCurrentReadSGI.

00624 {
00625    struct _glxapi_table *t;
00626    GET_DISPATCH(dpy, t);
00627    if (!t)
00628       return False;
00629    return (t->MakeCurrentReadSGI)(dpy, draw, read, ctx);
00630 }

int PUBLIC glXQueryChannelDeltasSGIX ( Display *  dpy,
int  screen,
int  channel,
int *  dx,
int *  dy,
int *  dw,
int *  dh 
)

Definition at line 875 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::QueryChannelDeltasSGIX.

00876 {
00877    struct _glxapi_table *t;
00878    GET_DISPATCH(dpy, t);
00879    if (!t)
00880       return 0;
00881    return (t->QueryChannelDeltasSGIX)(dpy, screen, channel, dx, dy, dw, dh);
00882 }

int PUBLIC glXQueryChannelRectSGIX ( Display *  dpy,
int  screen,
int  channel,
int *  x,
int *  y,
int *  w,
int *  h 
)

Definition at line 865 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::QueryChannelRectSGIX.

00866 {
00867    struct _glxapi_table *t;
00868    GET_DISPATCH(dpy, t);
00869    if (!t)
00870       return 0;
00871    return (t->QueryChannelRectSGIX)(dpy, screen, channel, x, y, w, h);
00872 }

int PUBLIC glXQueryContext ( Display *  dpy,
GLXContext  ctx,
int  attribute,
int *  value 
)

Definition at line 545 of file glxapi.c.

References assert, GET_DISPATCH, and _glxapi_table::QueryContext.

00546 {
00547    struct _glxapi_table *t;
00548    GET_DISPATCH(dpy, t);
00549    assert(t);
00550    if (!t)
00551       return 0; /* XXX correct? */
00552    return (t->QueryContext)(dpy, ctx, attribute, value);
00553 }

int PUBLIC glXQueryContextInfoEXT ( Display *  dpy,
GLXContext  context,
int  attribute,
int *  value 
)

Definition at line 699 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::QueryContextInfoEXT.

00700 {
00701    struct _glxapi_table *t;
00702    GET_DISPATCH(dpy, t);
00703    if (!t)
00704       return 0;  /* XXX ok? */
00705    return (t->QueryContextInfoEXT)(dpy, context, attribute, value);
00706 }

void PUBLIC glXQueryDrawable ( Display *  dpy,
GLXDrawable  draw,
int  attribute,
unsigned int *  value 
)

Definition at line 557 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::QueryDrawable.

00558 {
00559    struct _glxapi_table *t;
00560    GET_DISPATCH(dpy, t);
00561    if (!t)
00562       return;
00563    (t->QueryDrawable)(dpy, draw, attribute, value);
00564 }

Bool PUBLIC glXQueryExtension ( Display *  dpy,
int *  errorb,
int *  event 
)

Definition at line 270 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::QueryExtension.

00271 {
00272    struct _glxapi_table *t;
00273    GET_DISPATCH(dpy, t);
00274    if (!t)
00275       return False;
00276    return (t->QueryExtension)(dpy, errorb, event);
00277 }

const char PUBLIC* glXQueryExtensionsString ( Display *  dpy,
int  screen 
)

Definition at line 353 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::QueryExtensionsString.

00354 {
00355    struct _glxapi_table *t;
00356    GET_DISPATCH(dpy, t);
00357    if (!t)
00358       return NULL;
00359    return (t->QueryExtensionsString)(dpy, screen);
00360 }

int PUBLIC glXQueryGLXPbufferSGIX ( Display *  dpy,
GLXPbufferSGIX  pbuf,
int  attribute,
unsigned int *  value 
)

Definition at line 797 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::QueryGLXPbufferSGIX.

00798 {
00799    struct _glxapi_table *t;
00800    GET_DISPATCH(dpy, t);
00801    if (!t)
00802       return 0;
00803    return (t->QueryGLXPbufferSGIX)(dpy, pbuf, attribute, value);
00804 }

Bool PUBLIC glXQueryMaxSwapBarriersSGIX ( Display *  dpy,
int  screen,
int *  max 
)

Definition at line 937 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::QueryMaxSwapBarriersSGIX.

00938 {
00939    struct _glxapi_table *t;
00940    GET_DISPATCH(dpy, t);
00941    if (!t)
00942       return False;
00943    return (*t->QueryMaxSwapBarriersSGIX)(dpy, screen, max);
00944 }

const char PUBLIC* glXQueryServerString ( Display *  dpy,
int  screen,
int  name 
)

Definition at line 364 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::QueryServerString.

00365 {
00366    struct _glxapi_table *t;
00367    GET_DISPATCH(dpy, t);
00368    if (!t)
00369       return NULL;
00370    return (t->QueryServerString)(dpy, screen, name);
00371 }

Bool PUBLIC glXQueryVersion ( Display *  dpy,
int *  maj,
int *  min 
)

Definition at line 281 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::QueryVersion.

00282 {
00283    struct _glxapi_table *t;
00284    GET_DISPATCH(dpy, t);
00285    if (!t)
00286       return False;
00287    return (t->QueryVersion)(dpy, maj, min);
00288 }

Bool PUBLIC glXReleaseBuffersMESA ( Display *  dpy,
Window  w 
)

Definition at line 979 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::ReleaseBuffersMESA.

00980 {
00981    struct _glxapi_table *t;
00982    GET_DISPATCH(dpy, t);
00983    if (!t)
00984       return False;
00985    return (t->ReleaseBuffersMESA)(dpy, w);
00986 }

void glXReleaseTexImageEXT ( Display *  dpy,
GLXDrawable  drawable,
int  buffer 
)

Definition at line 1102 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::ReleaseTexImageEXT.

01103 {
01104    struct _glxapi_table *t;
01105    GET_DISPATCH(dpy, t);
01106    if (t)
01107       t->ReleaseTexImageEXT(dpy, drawable, buffer);
01108 }

void PUBLIC glXSelectEvent ( Display *  dpy,
GLXDrawable  drawable,
unsigned long  mask 
)

Definition at line 568 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::SelectEvent.

00569 {
00570    struct _glxapi_table *t;
00571    GET_DISPATCH(dpy, t);
00572    if (!t)
00573       return;
00574    (t->SelectEvent)(dpy, drawable, mask);
00575 }

void PUBLIC glXSelectEventSGIX ( Display *  dpy,
GLXDrawable  drawable,
unsigned long  mask 
)

Definition at line 807 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::SelectEventSGIX.

00808 {
00809    struct _glxapi_table *t;
00810    GET_DISPATCH(dpy, t);
00811    if (!t)
00812       return;
00813    (t->SelectEventSGIX)(dpy, drawable, mask);
00814 }

Bool PUBLIC glXSet3DfxModeMESA ( int  mode  ) 

Definition at line 1007 of file glxapi.c.

References GET_DISPATCH, glXGetCurrentDisplay(), and _glxapi_table::Set3DfxModeMESA.

01008 {
01009    struct _glxapi_table *t;
01010    Display *dpy = glXGetCurrentDisplay();
01011    GET_DISPATCH(dpy, t);
01012    if (!t)
01013       return False;
01014    return (t->Set3DfxModeMESA)(mode);
01015 }

void PUBLIC glXSwapBuffers ( Display *  dpy,
GLXDrawable  drawable 
)

Definition at line 292 of file glxapi.c.

References GET_DISPATCH, and _glxapi_table::SwapBuffers.

00293 {
00294    struct _glxapi_table *t;
00295    GET_DISPATCH(dpy, t);
00296    if (!t)
00297       return;
00298    (t->SwapBuffers)(dpy, drawable);
00299 }

int PUBLIC glXSwapIntervalSGI ( int  interval  ) 

Definition at line 582 of file glxapi.c.

References GET_DISPATCH, glXGetCurrentDisplay(), and _glxapi_table::SwapIntervalSGI.

00583 {
00584    struct _glxapi_table *t;
00585    Display *dpy = glXGetCurrentDisplay();
00586    GET_DISPATCH(dpy, t);
00587    if (!t)
00588       return 0;
00589    return (t->SwapIntervalSGI)(interval);
00590 }

void PUBLIC glXUseXFont ( Font  font,
int  first,
int  count,
int  listBase 
)

Definition at line 303 of file glxapi.c.

References GET_DISPATCH, glXGetCurrentDisplay(), and _glxapi_table::UseXFont.

00304 {
00305    struct _glxapi_table *t;
00306    Display *dpy = glXGetCurrentDisplay();
00307    GET_DISPATCH(dpy, t);
00308    if (!t)
00309       return;
00310    (t->UseXFont)(font, first, count, listBase);
00311 }

void PUBLIC glXWaitGL ( void   ) 

Definition at line 315 of file glxapi.c.

References GET_DISPATCH, glXGetCurrentDisplay(), and _glxapi_table::WaitGL.

00316 {
00317    struct _glxapi_table *t;
00318    Display *dpy = glXGetCurrentDisplay();
00319    GET_DISPATCH(dpy, t);
00320    if (!t)
00321       return;
00322    (t->WaitGL)();
00323 }

int PUBLIC glXWaitVideoSyncSGI ( int  divisor,
int  remainder,
unsigned int *  count 
)

Definition at line 608 of file glxapi.c.

References GET_DISPATCH, glXGetCurrentContext(), glXGetCurrentDisplay(), and _glxapi_table::WaitVideoSyncSGI.

00609 {
00610    struct _glxapi_table *t;
00611    Display *dpy = glXGetCurrentDisplay();
00612    GET_DISPATCH(dpy, t);
00613    if (!t || !glXGetCurrentContext())
00614       return GLX_BAD_CONTEXT;
00615    return (t->WaitVideoSyncSGI)(divisor, remainder, count);
00616 }

void PUBLIC glXWaitX ( void   ) 

Definition at line 327 of file glxapi.c.

References GET_DISPATCH, glXGetCurrentDisplay(), and _glxapi_table::WaitX.

00328 {
00329    struct _glxapi_table *t;
00330    Display *dpy = glXGetCurrentDisplay();
00331    GET_DISPATCH(dpy, t);
00332    if (!t)
00333       return;
00334    (t->WaitX)();
00335 }

static void SetCurrentContext ( GLXContext  c  )  [static]

Definition at line 135 of file glxapi.c.

References pipe_tsd_set().

00136 {
00137    pipe_tsd_set(&ContextTSD, c);
00138 }


Variable Documentation

pipe_tsd ContextTSD

GLX API current context.

Definition at line 131 of file glxapi.c.

struct display_dispatch* DispatchList = NULL [static]

Definition at line 53 of file glxapi.c.

struct name_address_pair GLX_functions[] [static]

Definition at line 1201 of file glxapi.c.

Display* prevDisplay = NULL [static]

Definition at line 57 of file glxapi.c.

struct _glxapi_table* prevTable = NULL [static]

Definition at line 58 of file glxapi.c.


Generated on Tue Sep 29 06:25:50 2009 for Gallium3D by  doxygen 1.5.4