⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 glxapi.c

📁 Mesa is an open-source implementation of the OpenGL specification - a system for rendering interacti
💻 C
📖 第 1 页 / 共 3 页
字号:
void PUBLICglXDestroyPixmap(Display *dpy, GLXPixmap pixmap){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return;   (t->DestroyPixmap)(dpy, pixmap);}void PUBLICglXDestroyWindow(Display *dpy, GLXWindow window){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return;   (t->DestroyWindow)(dpy, window);}GLXDrawable PUBLICglXGetCurrentReadDrawable(void){   __GLXcontext *gc = (__GLXcontext *) glXGetCurrentContext();   return gc ? gc->currentReadable : 0;}int PUBLICglXGetFBConfigAttrib(Display *dpy, GLXFBConfig config, int attribute, int *value){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return GLX_NO_EXTENSION;   return (t->GetFBConfigAttrib)(dpy, config, attribute, value);}GLXFBConfig PUBLIC *glXGetFBConfigs(Display *dpy, int screen, int *nelements){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->GetFBConfigs)(dpy, screen, nelements);}void PUBLICglXGetSelectedEvent(Display *dpy, GLXDrawable drawable, unsigned long *mask){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return;   (t->GetSelectedEvent)(dpy, drawable, mask);}XVisualInfo PUBLIC *glXGetVisualFromFBConfig(Display *dpy, GLXFBConfig config){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return NULL;   return (t->GetVisualFromFBConfig)(dpy, config);}Bool PUBLICglXMakeContextCurrent(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx){   Bool b;   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return False;   b = (t->MakeContextCurrent)(dpy, draw, read, ctx);   if (b) {      SetCurrentContext(ctx);   }   return b;}int PUBLICglXQueryContext(Display *dpy, GLXContext ctx, int attribute, int *value){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   assert(t);   if (!t)      return 0; /* XXX correct? */   return (t->QueryContext)(dpy, ctx, attribute, value);}void PUBLICglXQueryDrawable(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return;   (t->QueryDrawable)(dpy, draw, attribute, value);}void PUBLICglXSelectEvent(Display *dpy, GLXDrawable drawable, unsigned long mask){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return;   (t->SelectEvent)(dpy, drawable, mask);}/*** GLX_SGI_swap_control ***/int PUBLICglXSwapIntervalSGI(int interval){   struct _glxapi_table *t;   Display *dpy = glXGetCurrentDisplay();   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->SwapIntervalSGI)(interval);}/*** GLX_SGI_video_sync ***/int PUBLICglXGetVideoSyncSGI(unsigned int *count){   struct _glxapi_table *t;   Display *dpy = glXGetCurrentDisplay();   GET_DISPATCH(dpy, t);   if (!t || !glXGetCurrentContext())      return GLX_BAD_CONTEXT;   return (t->GetVideoSyncSGI)(count);}int PUBLICglXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count){   struct _glxapi_table *t;   Display *dpy = glXGetCurrentDisplay();   GET_DISPATCH(dpy, t);   if (!t || !glXGetCurrentContext())      return GLX_BAD_CONTEXT;   return (t->WaitVideoSyncSGI)(divisor, remainder, count);}/*** GLX_SGI_make_current_read ***/Bool PUBLICglXMakeCurrentReadSGI(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return False;   return (t->MakeCurrentReadSGI)(dpy, draw, read, ctx);}GLXDrawable PUBLICglXGetCurrentReadDrawableSGI(void){   return glXGetCurrentReadDrawable();}#if defined(_VL_H)GLXVideoSourceSGIX PUBLICglXCreateGLXVideoSourceSGIX(Display *dpy, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->CreateGLXVideoSourceSGIX)(dpy, screen, server, path, nodeClass, drainNode);}void PUBLICglXDestroyGLXVideoSourceSGIX(Display *dpy, GLXVideoSourceSGIX src){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->DestroyGLXVideoSourceSGIX)(dpy, src);}#endif/*** GLX_EXT_import_context ***/void PUBLICglXFreeContextEXT(Display *dpy, GLXContext context){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return;   (t->FreeContextEXT)(dpy, context);}GLXContextID PUBLICglXGetContextIDEXT(const GLXContext context){   return ((__GLXcontext *) context)->xid;}Display PUBLIC *glXGetCurrentDisplayEXT(void){   return glXGetCurrentDisplay();}GLXContext PUBLICglXImportContextEXT(Display *dpy, GLXContextID contextID){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->ImportContextEXT)(dpy, contextID);}int PUBLICglXQueryContextInfoEXT(Display *dpy, GLXContext context, int attribute,int *value){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;  /* XXX ok? */   return (t->QueryContextInfoEXT)(dpy, context, attribute, value);}/*** GLX_SGIX_fbconfig ***/int PUBLICglXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config, int attribute, int *value){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->GetFBConfigAttribSGIX)(dpy, config, attribute, value);}GLXFBConfigSGIX PUBLIC *glXChooseFBConfigSGIX(Display *dpy, int screen, int *attrib_list, int *nelements){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->ChooseFBConfigSGIX)(dpy, screen, attrib_list, nelements);}GLXPixmap PUBLICglXCreateGLXPixmapWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->CreateGLXPixmapWithConfigSGIX)(dpy, config, pixmap);}GLXContext PUBLICglXCreateContextWithConfigSGIX(Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->CreateContextWithConfigSGIX)(dpy, config, render_type, share_list, direct);}XVisualInfo PUBLIC *glXGetVisualFromFBConfigSGIX(Display *dpy, GLXFBConfigSGIX config){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->GetVisualFromFBConfigSGIX)(dpy, config);}GLXFBConfigSGIX PUBLICglXGetFBConfigFromVisualSGIX(Display *dpy, XVisualInfo *vis){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->GetFBConfigFromVisualSGIX)(dpy, vis);}/*** GLX_SGIX_pbuffer ***/GLXPbufferSGIX PUBLICglXCreateGLXPbufferSGIX(Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->CreateGLXPbufferSGIX)(dpy, config, width, height, attrib_list);}void PUBLICglXDestroyGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return;   (t->DestroyGLXPbufferSGIX)(dpy, pbuf);}int PUBLICglXQueryGLXPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->QueryGLXPbufferSGIX)(dpy, pbuf, attribute, value);}void PUBLICglXSelectEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long mask){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return;   (t->SelectEventSGIX)(dpy, drawable, mask);}void PUBLICglXGetSelectedEventSGIX(Display *dpy, GLXDrawable drawable, unsigned long *mask){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return;   (t->GetSelectedEventSGIX)(dpy, drawable, mask);}/*** GLX_SGI_cushion ***/void PUBLICglXCushionSGI(Display *dpy, Window win, float cushion){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return;   (t->CushionSGI)(dpy, win, cushion);}/*** GLX_SGIX_video_resize ***/int PUBLICglXBindChannelToWindowSGIX(Display *dpy, int screen, int channel , Window window){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->BindChannelToWindowSGIX)(dpy, screen, channel, window);}int PUBLICglXChannelRectSGIX(Display *dpy, int screen, int channel, int x, int y, int w, int h){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->ChannelRectSGIX)(dpy, screen, channel, x, y, w, h);}int PUBLICglXQueryChannelRectSGIX(Display *dpy, int screen, int channel, int *x, int *y, int *w, int *h){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->QueryChannelRectSGIX)(dpy, screen, channel, x, y, w, h);}int PUBLICglXQueryChannelDeltasSGIX(Display *dpy, int screen, int channel, int *dx, int *dy, int *dw, int *dh){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->QueryChannelDeltasSGIX)(dpy, screen, channel, dx, dy, dw, dh);}int PUBLICglXChannelRectSyncSGIX(Display *dpy, int screen, int channel, GLenum synctype){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return 0;   return (t->ChannelRectSyncSGIX)(dpy, screen, channel, synctype);}#if defined(_DM_BUFFER_H_)Bool PUBLICglXAssociateDMPbufferSGIX(Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return False;   return (t->AssociateDMPbufferSGIX)(dpy, pbuffer, params, dmbuffer);}#endif/*** GLX_SGIX_swap_group ***/void PUBLICglXJoinSwapGroupSGIX(Display *dpy, GLXDrawable drawable, GLXDrawable member){   struct _glxapi_table *t;   GET_DISPATCH(dpy, t);   if (!t)      return;   (*t->JoinSwapGroupSGIX)(dpy, drawable, member);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -