[cairo-commit] glitz/src glitz.h, 1.42, 1.43 glitz_drawable.c, 1.7, 1.8 glitz_gl.h, 1.20, 1.21 glitzint.h, 1.41, 1.42

David Reveman commit at pdx.freedesktop.org
Wed May 24 05:14:22 PDT 2006


Committed by: davidr

Update of /cvs/cairo/glitz/src
In directory kemper:/tmp/cvs-serv12059/src

Modified Files:
	glitz.h glitz_drawable.c glitz_gl.h glitzint.h 
Log Message:
Add glitz_drawable_get_gl_string and direct rendering to the feature mask

Index: glitz.h
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- glitz.h	20 May 2006 20:33:54 -0000	1.42
+++ glitz.h	24 May 2006 12:14:20 -0000	1.43
@@ -130,6 +130,7 @@
 #define GLITZ_FEATURE_MULTI_DRAW_ARRAYS_MASK        (1L << 15)
 #define GLITZ_FEATURE_FRAMEBUFFER_OBJECT_MASK       (1L << 16)
 #define GLITZ_FEATURE_COPY_SUB_BUFFER_MASK          (1L << 17)
+#define GLITZ_FEATURE_DIRECT_RENDERING_MASK         (1L << 18)
 
 
 /* glitz_format.c */
@@ -282,6 +283,17 @@
 glitz_drawable_format_t *
 glitz_drawable_get_format (glitz_drawable_t *drawable);
 
+typedef enum {
+    GLITZ_GL_STRING_VENDOR,
+    GLITZ_GL_STRING_RENDERER,
+    GLITZ_GL_STRING_VERSION,
+    GLITZ_GL_STRING_EXTENSIONS
+} glitz_gl_string_t;
+
+const char *
+glitz_drawable_get_gl_string (glitz_drawable_t  *drawable,
+			      glitz_gl_string_t name);
+
 
 /* glitz_surface.c */
 

Index: glitz_drawable.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_drawable.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- glitz_drawable.c	13 Mar 2006 14:23:44 -0000	1.7
+++ glitz_drawable.c	24 May 2006 12:14:20 -0000	1.8
@@ -408,3 +408,36 @@
     return &drawable->format->d;
 }
 slim_hidden_def(glitz_drawable_get_format);
+
+const char *
+glitz_drawable_get_gl_string (glitz_drawable_t  *drawable,
+			      glitz_gl_string_t name)
+{
+    const glitz_gl_ubyte_t *string;
+    glitz_gl_enum_t	   gl_name;
+
+    switch (name) {
+    case GLITZ_GL_STRING_VENDOR:
+	gl_name = GLITZ_GL_VENDOR;
+	break;
+    case GLITZ_GL_STRING_RENDERER:
+	gl_name = GLITZ_GL_RENDERER;
+	break;
+    case GLITZ_GL_STRING_VERSION:
+	gl_name = GLITZ_GL_VERSION;
+	break;
+    case GLITZ_GL_STRING_EXTENSIONS:
+	gl_name = GLITZ_GL_EXTENSIONS;
+	break;
+    default:
+	return NULL;
+    }
+
+    drawable->backend->push_current (drawable, NULL, GLITZ_CONTEXT_CURRENT,
+				     NULL);
+    string = drawable->backend->gl->get_string (gl_name);
+    drawable->backend->pop_current (drawable);
+
+    return (const char *) string;
+}
+slim_hidden_def(glitz_drawable_get_gl_string);

Index: glitz_gl.h
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_gl.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- glitz_gl.h	13 Mar 2006 14:23:44 -0000	1.20
+++ glitz_gl.h	24 May 2006 12:14:20 -0000	1.21
@@ -60,6 +60,8 @@
 #define GLITZ_GL_NO_ERROR          0x0
 #define GLITZ_GL_INVALID_OPERATION 0x0502
 
+#define GLITZ_GL_VENDOR                      0x1F00
+#define GLITZ_GL_RENDERER                    0x1F01
 #define GLITZ_GL_VERSION                     0x1F02
 #define GLITZ_GL_EXTENSIONS                  0x1F03
 

Index: glitzint.h
===================================================================
RCS file: /cvs/cairo/glitz/src/glitzint.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- glitzint.h	13 Mar 2006 14:23:44 -0000	1.41
+++ glitzint.h	24 May 2006 12:14:20 -0000	1.42
@@ -1077,6 +1077,7 @@
 slim_hidden_proto(glitz_drawable_finish)
 slim_hidden_proto(glitz_drawable_get_features)
 slim_hidden_proto(glitz_drawable_get_format)
+slim_hidden_proto(glitz_drawable_get_gl_string)
 slim_hidden_proto(glitz_surface_set_transform)
 slim_hidden_proto(glitz_surface_set_fill)
 slim_hidden_proto(glitz_surface_set_component_alpha)



More information about the cairo-commit mailing list