[PATCH] glproto: Document GLX_ARB_create_context and GLX_ARB_create_context_profile protocol

Ian Romanick idr at freedesktop.org
Mon Nov 28 11:08:38 PST 2011


From: Ian Romanick <ian.d.romanick at intel.com>

Also add the struct names (in addition to the typedef names).  Most of
the other protocol structures have this, but some lack it.  I'm not
sure if this means the glproto package version should be bumped or not.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 glxproto.h |   58 +++++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 45 insertions(+), 13 deletions(-)

diff --git a/glxproto.h b/glxproto.h
index 0446217..26a6cce 100644
--- a/glxproto.h
+++ b/glxproto.h
@@ -1288,15 +1288,34 @@ typedef struct {
 } xGLXHyperpipeConfigSGIXReply;
 #define sz_xGLXHyperpipeConfigSGIXReply 32
 
-/*
- * GLX_ARB_create_context
+/**
+ * \name Protocol structures for GLX_ARB_create_context and
  * GLX_ARB_create_context_profile
  */
-
-/*
- * glXSetClientInfoARB
+/*@{*/
+/**
+ * Protocol header for glXSetClientInfoARB
+ *
+ * This structure is follwed by \c n0 * 2 \c CARD32 values listing the OpenGL
+ * versions supported by the client.  The pairs of values are an OpenGL major
+ * version followed by a minor version.  For example,
+ *
+ *      CARD32 versions[4] = { 2, 1, 3, 0 };
+ *
+ * says that the client supports OpenGL 2.1 and OpenGL 3.0.
+ * 
+ * These are followed by \c n1 bytes of \c STRING8 containing the OpenGL
+ * extension string supported by the client and up to 3 bytes of padding.
+ *
+ * The list of OpenGL extensions is followed by \c n2 bytes of \c STRING8
+ * containing the GLX extension string supported by the client and up to 3
+ * bytes of padding.
+ *
+ * This protocol replaces \c GLXClientInfo.
+ *
+ * \sa GLXClientInfo, GLXSetClientInfo2ARB
  */
-typedef struct {
+typedef struct GLXSetClientInfoARB {
     CARD8	reqType;
     CARD8	glxCode;
     CARD16	length B16;
@@ -1311,10 +1330,13 @@ typedef struct {
 } xGLXSetClientInfoARB;
 #define sz_xGLXSetClientInfoARB 24
 
-/*
-** glXCreateContextAttribsARB
-*/
-typedef struct {
+/**
+ * Protocol head for glXCreateContextAttribsARB
+ *
+ * This protocol replaces \c GLXCreateContext, \c GLXCreateNewContext, and
+ * \c GLXCreateContextWithConfigSGIX.
+ */
+typedef struct GLXCreateContextAttribsARB {
     CARD8	reqType;
     CARD8	glxCode;
     CARD16	length B16;
@@ -1330,10 +1352,18 @@ typedef struct {
 } xGLXCreateContextAttribsARB;
 #define sz_xGLXCreateContextAttribsARB 28
 
-/*
- * glXSetClientInfo2ARB
+/**
+ * Protocol header for glXSetClientInfo2ARB
+ *
+ * The glXSetClientInfo2ARB protocol differs from glXSetClientInfoARB in that
+ * the list of OpenGL versions supported by the client is 3 \c CARD32 values
+ * per version: major version, minor version, and supported profile mask.
+ *
+ * This protocol replaces \c GLXClientInfo and \c GLXSetClientInfoARB.
+ *
+ * \sa GLXClientInfo, GLXSetClientInfoARB
  */
-typedef struct {
+typedef struct GLXSetClientInfo2ARB {
     CARD8	reqType;
     CARD8	glxCode;
     CARD16	length B16;
@@ -1347,6 +1377,8 @@ typedef struct {
     */
 } xGLXSetClientInfo2ARB;
 #define sz_xGLXSetClientInfo2ARB 24
+/*@}*/
+
 /************************************************************************/
 
 /*
-- 
1.7.6.4



More information about the xorg-devel mailing list