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

📄 glxclient.h

📁 mesa-6.5-minigui源码
💻 H
📖 第 1 页 / 共 2 页
字号:
#ifdef GLX_DIRECT_RENDERING    /**     * Per context direct rendering interface functions and data.     */    __DRIcontext driContext;#endif        /**     * \c GLXFBConfigID used to create this context.  May be \c None.  This     * field has been replaced by the \c mode field.     *     * \since Internal API version 20030317.     *     * \deprecated     * This filed has been largely been replaced by the \c mode field, but     * the work is not quite done.     */    GLXFBConfigID  fbconfigID;    /**     * The current read-drawable for this context.  Will be None if this     * context is not current to any drawable.     *     * \since Internal API version 20030606.     */    GLXDrawable currentReadable;   /**     * Pointer to client-state data that is private to libGL.  This is only    * used for indirect rendering contexts.    *    * No internal API version change was made for this change.  Client-side    * drivers should NEVER use this data or even care that it exists.    */   void * client_state_private;   /**    * Stored value for \c glXQueryContext attribute \c GLX_RENDER_TYPE.    */   int renderType;       /**    * \name Raw server GL version    *    * True core GL version supported by the server.  This is the raw value    * returned by the server, and it may not reflect what is actually    * supported (or reported) by the client-side library.    */    /*@{*/   int server_major;        /**< Major version number. */   int server_minor;        /**< Minor version number. */    /*@}*/    char gl_extension_bits[ __GL_EXT_BYTES ];};#define __glXSetError(gc,code) \    if (!(gc)->error) {	       \	(gc)->error = code;    \    }extern void __glFreeAttributeState(__GLXcontext *);/************************************************************************//** * The size of the largest drawing command known to the implementation * that will use the GLXRender GLX command.  In this case it is * \c glPolygonStipple. */#define __GLX_MAX_SMALL_RENDER_CMD_SIZE	156/** * To keep the implementation fast, the code uses a "limit" pointer * to determine when the drawing command buffer is too full to hold * another fixed size command.  This constant defines the amount of * space that must always be available in the drawing command buffer * at all times for the implementation to work.  It is important that * the number be just large enough, but not so large as to reduce the * efficacy of the buffer.  The "+32" is just to keep the code working * in case somebody counts wrong. */#define __GLX_BUFFER_LIMIT_SIZE	(__GLX_MAX_SMALL_RENDER_CMD_SIZE + 32)/** * This implementation uses a smaller threshold for switching * to the RenderLarge protocol than the protcol requires so that * large copies don't occur. */#define __GLX_RENDER_CMD_SIZE_LIMIT	4096/** * One of these records exists per screen of the display.  It contains * a pointer to the config data for that screen (if the screen supports GL). */typedef struct __GLXscreenConfigsRec {    /**     * GLX extension string reported by the X-server.     */    const char *serverGLXexts;    /**     * GLX extension string to be reported to applications.  This is the     * set of extensions that the application can actually use.     */    char *effectiveGLXexts;#ifdef GLX_DIRECT_RENDERING    /**     * Per screen direct rendering interface functions and data.     */    __DRIscreen driScreen;#endif    /**     * Linked list of configurations for this screen.     */    __GLcontextModes *configs;    /**     * Per-screen dynamic GLX extension tracking.  The \c direct_support     * field only contains enough bits for 64 extensions.  Should libGL     * ever need to track more than 64 GLX extensions, we can safely grow     * this field.  The \c __GLXscreenConfigs structure is not used outside     * libGL.     */    /*@{*/    unsigned char direct_support[8];    GLboolean ext_list_first_time;    /*@}*/} __GLXscreenConfigs;/** * Per display private data.  One of these records exists for each display * that is using the OpenGL (GLX) extension. */struct __GLXdisplayPrivateRec {    /**     * Back pointer to the display     */    Display *dpy;    /**     * The \c majorOpcode is common to all connections to the same server.     * It is also copied into the context structure.     */    int majorOpcode;    /**     * \name Server Version     *     * Major and minor version returned by the server during initialization.     */    /*@{*/    int majorVersion, minorVersion;    /*@}*/    /**     * \name Storage for the servers GLX vendor and versions strings.     *      * These are the same for all screens on this display. These fields will     * be filled in on demand.     */    /*@{*/    const char *serverGLXvendor;    const char *serverGLXversion;    /*@}*/    /**     * Configurations of visuals for all screens on this display.     * Also, per screen data which now includes the server \c GLX_EXTENSION     * string.     */    __GLXscreenConfigs *screenConfigs;#ifdef GLX_DIRECT_RENDERING    /**     * Per display direct rendering interface functions and data.     */    __DRIdisplay driDisplay;#endif};void __glXFreeContext(__GLXcontext*);extern GLubyte *__glXFlushRenderBuffer(__GLXcontext*, GLubyte*);extern void __glXSendLargeChunk(__GLXcontext *gc, GLint requestNumber, 				GLint totalRequests,				const GLvoid * data, GLint dataLen);extern void __glXSendLargeCommand(__GLXcontext *, const GLvoid *, GLint,				  const GLvoid *, GLint);/* Initialize the GLX extension for dpy */extern __GLXdisplayPrivate *__glXInitialize(Display*);/************************************************************************/extern int __glXDebug;/* This is per-thread storage in an MT environment */#if defined( USE_XTHREADS ) || defined( PTHREADS )extern void __glXSetCurrentContext(__GLXcontext *c);# if defined( GLX_USE_TLS )extern __thread void * __glX_tls_Context    __attribute__((tls_model("initial-exec")));#  define __glXGetCurrentContext()	__glX_tls_Context# elseextern __GLXcontext *__glXGetCurrentContext(void);# endif /* defined( GLX_USE_TLS ) */#elseextern __GLXcontext *__glXcurrentContext;#define __glXGetCurrentContext()	__glXcurrentContext#define __glXSetCurrentContext(gc)	__glXcurrentContext = gc#endif /* defined( USE_XTHREADS ) || defined( PTHREADS ) *//*** Global lock for all threads in this address space using the GLX** extension*/#if defined( USE_XTHREADS )extern xmutex_rec __glXmutex;#define __glXLock()    xmutex_lock(&__glXmutex)#define __glXUnlock()  xmutex_unlock(&__glXmutex)#elif defined( PTHREADS )extern pthread_mutex_t __glXmutex;#define __glXLock()    pthread_mutex_lock(&__glXmutex)#define __glXUnlock()  pthread_mutex_unlock(&__glXmutex)#else#define __glXLock()#define __glXUnlock()#endif/*** Setup for a command.  Initialize the extension for dpy if necessary.*/extern CARD8 __glXSetupForCommand(Display *dpy);/************************************************************************//*** Data conversion and packing support.*/extern const GLuint __glXDefaultPixelStore[9];/* Send an image to the server using RenderLarge. */extern void __glXSendLargeImage(__GLXcontext *gc, GLint compsize, GLint dim,    GLint width, GLint height, GLint depth, GLenum format, GLenum type,    const GLvoid *src, GLubyte *pc, GLubyte *modes);/* Return the size, in bytes, of some pixel data */extern GLint __glImageSize(GLint, GLint, GLint, GLenum, GLenum, GLenum);/* Return the number of elements per group of a specified format*/extern GLint __glElementsPerGroup(GLenum format, GLenum type);/* Return the number of bytes per element, based on the element type (other** than GL_BITMAP).*/extern GLint __glBytesPerElement(GLenum type);/*** Fill the transport buffer with the data from the users buffer,** applying some of the pixel store modes (unpack modes) to the data** first.  As a side effect of this call, the "modes" field is** updated to contain the modes needed by the server to decode the** sent data.*/extern void __glFillImage(__GLXcontext*, GLint, GLint, GLint, GLint, GLenum,			  GLenum, const GLvoid*, GLubyte*, GLubyte*);/* Copy map data with a stride into a packed buffer */extern void __glFillMap1f(GLint, GLint, GLint, const GLfloat *, GLubyte *);extern void __glFillMap1d(GLint, GLint, GLint, const GLdouble *, GLubyte *);extern void __glFillMap2f(GLint, GLint, GLint, GLint, GLint,			  const GLfloat *, GLfloat *);extern void __glFillMap2d(GLint, GLint, GLint, GLint, GLint,			  const GLdouble *, GLdouble *);/*** Empty an image out of the reply buffer into the clients memory applying** the pack modes to pack back into the clients requested format.*/extern void __glEmptyImage(__GLXcontext*, GLint, GLint, GLint, GLint, GLenum,		           GLenum, const GLubyte *, GLvoid *);/*** Allocate and Initialize Vertex Array client state */extern void __glXInitVertexArrayState(__GLXcontext*);/*** Inform the Server of the major and minor numbers and of the client** libraries extension string.*/extern void __glXClientInfo (  Display *dpy, int opcode );/************************************************************************//*** Declarations that should be in Xlib*/#ifdef __GL_USE_OUR_PROTOTYPESextern void _XFlush(Display*);extern Status _XReply(Display*, xReply*, int, Bool);extern void _XRead(Display*, void*, long);extern void _XSend(Display*, const void*, long);#endifextern void __glXInitializeVisualConfigFromTags( __GLcontextModes *config,    int count, const INT32 *bp, Bool tagged_only, Bool fbconfig_style_tags );extern char * __glXGetStringFromServer( Display * dpy, int opcode,    CARD32 glxCode, CARD32 for_whom, CARD32 name );extern char *__glXstrdup(const char *str);extern const char __glXGLClientVersion[];extern const char __glXGLClientExtensions[];/* Determine the internal API version */extern int __glXGetInternalVersion(void);/* Get the unadjusted system time */extern int __glXGetUST( int64_t * ust );#endif /* !__GLX_client_h__ */

⌨️ 快捷键说明

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