[cairo-commit] libglc/src glc-config.h,NONE,1.1 Makefile.am,1.2,1.3 glc.h,1.1.1.1,1.2 glc_glx_context.c,1.2,1.3 glc_glx_extension.c,1.1.1.1,1.2 glc_glx_format.c,1.2,1.3 glc_glx_info.c,1.3,1.4 glc_glx_pbuffer.c,1.1.1.1,1.2 glc_glx_surface.c,1.3,1.4 glcint.h,1.5,1.6 glc-glx.h,1.1.1.1,NONE glc_glxint.h,1.2,NONE
David Reveman
commit at pdx.freedesktop.org
Thu Dec 4 17:55:34 PST 2003
- Previous message: [cairo-commit] libglc libglc-glx.pc.in,NONE,1.1 ChangeLog,1.9,1.10 Makefile.am,1.1.1.1,1.2 configure.in,1.1.1.1,1.2 acconfig.h,1.1.1.1,NONE libglc.pc.in,1.1.1.1,NONE
- Next message: [cairo-commit] libglc/src glc-config.h.in,NONE,1.1 glc-config.h,1.1,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: davidr
Update of /cvs/cairo/libglc/src
In directory pdx:/tmp/cvs-serv6793/src
Modified Files:
Makefile.am glc.h glc_glx_context.c glc_glx_extension.c
glc_glx_format.c glc_glx_info.c glc_glx_pbuffer.c
glc_glx_surface.c glcint.h
Added Files:
glc-config.h
Removed Files:
glc-glx.h glc_glxint.h
Log Message:
Added conditional backend building
--- NEW FILE: glc-config.h ---
(This appears to be a binary file; contents omitted.)
Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/libglc/src/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Makefile.am 3 Dec 2003 16:55:50 -0000 1.2
--- Makefile.am 5 Dec 2003 01:55:31 -0000 1.3
***************
*** 1,10 ****
-
lib_LTLIBRARIES = libglc.la
! include_HEADERS = glc.h glc-glx.h
libglc_la_SOURCES = \
- glc.h \
- glcint.h \
glc.c \
glc_operator.c \
glc_surface.c \
--- 1,20 ----
lib_LTLIBRARIES = libglc.la
! include_HEADERS = glc.h glc-config.h
!
! if HAVE_GLX_BACKEND
! libglc_glx_sources = \
! glc_glx_surface.c \
! glc_glx_format.c \
! glc_glx_info.c \
! glc_glx_extension.c \
! glc_glx_context.c \
! glc_glx_pbuffer.c
! else
! libglc_glx_sources =
! endif
libglc_la_SOURCES = \
glc.c \
+ glc.h \
glc_operator.c \
glc_surface.c \
***************
*** 16,31 ****
glc_matrix.c \
glc_util.c \
! glc-glx.h \
! glc_glxint.h \
! glc_glx_surface.c \
! glc_glx_format.c \
! glc_glx_info.c \
! glc_glx_extension.c \
! glc_glx_context.c \
! glc_glx_pbuffer.c
libglc_la_LDFLAGS = -version-info @VERSION_INFO@
! INCLUDES = $(LIBGLC_CFLAGS) $(X_CFLAGS)
! libglc_la_LIBADD = $(LIBGLC_LIBS) @X_LIBS@ -lX11 -lGL
--- 26,35 ----
glc_matrix.c \
glc_util.c \
! $(libglc_glx_sources) \
! glcint.h
libglc_la_LDFLAGS = -version-info @VERSION_INFO@
! INCLUDES = $(LIBGLC_CFLAGS) $(GL_CFLAGS) $(X_CFLAGS) $(XTHREAD_CFLAGS)
! libglc_la_LIBADD = $(LIBGLC_LIBS) $(GL_LIBS) $(X_LIBS) $(XTHREAD_LIBS) -lm
Index: glc.h
===================================================================
RCS file: /cvs/cairo/libglc/src/glc.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** glc.h 27 Nov 2003 11:45:47 -0000 1.1.1.1
--- glc.h 5 Dec 2003 01:55:31 -0000 1.2
***************
*** 48,51 ****
--- 48,53 ----
#endif
+ #include <glc-config.h>
+
/* NOTE: Must be manually synchronized with LIBGLC_VERSION in configure.in */
#define GLC_MAJOR 0
***************
*** 309,313 ****
--- 311,441 ----
int width,
int height);
+
+
+ #ifdef LIBGLC_HAS_GLX_BACKEND
+
+ #include <X11/Xlib.h>
+ #include <GL/glx.h>
+
+
+ /* glc_glx_info.c */
+
+ extern void __external_linkage
+ glc_glx_initialize (Display *display,
+ int screen);
+
+ #define GLC_GLX_FEATURE_FBCONFIG_MASK (1L << 0)
+ #define GLC_GLX_FEATURE_PBUFFER_MASK (1L << 1)
+ #define GLC_GLX_FEATURE_RECTANGULAR_TEXTURE_MASK (1L << 2)
+
+ extern long int __external_linkage
+ glc_glx_features (Display *display,
+ int screen);
+
+
+ /* glc_glx_format.c */
+
+ #define GLC_GLX_FORMAT_ID_MASK (1 << 0)
+ #define GLC_GLX_FORMAT_TYPE_MASK (1 << 1)
+ #define GLC_GLX_FORMAT_ALPHA_MASK (1 << 2)
+ #define GLC_GLX_FORMAT_RED_MASK (1 << 3)
+ #define GLC_GLX_FORMAT_GREEN_MASK (1 << 4)
+ #define GLC_GLX_FORMAT_BLUE_MASK (1 << 5)
+ #define GLC_GLX_FORMAT_DOUBLEBUFFER_MASK (1 << 6)
+ #define GLC_GLX_FORMAT_STEREO_MASK (1 << 7)
+ #define GLC_GLX_FORMAT_FBCONFIGID_MASK (1 << 8)
+ #define GLC_GLX_FORMAT_VISUALID_MASK (1 << 9)
+
+ typedef unsigned int glc_glx_format_id_t;
+
+ typedef struct {
+ unsigned short red;
+ unsigned short green;
+ unsigned short blue;
+ unsigned short alpha;
+ } glc_glx_direct_format_t;
+
+ typedef enum {
+ GLC_GLX_FORMAT_TYPE_INDEXED = PictTypeIndexed,
+ GLC_GLX_FORMAT_TYPE_DIRECT = PictTypeDirect
+ } glc_glx_format_type_t;
+
+ typedef struct _glc_glx_format_t {
+ glc_glx_format_id_t id;
+ glc_glx_format_type_t type;
+ glc_glx_direct_format_t direct;
+ glc_bool_t doublebuffer;
+ glc_bool_t stereo;
+ XID fbconfigid;
+ VisualID visualid;
+ } glc_glx_format_t;
+
+ extern glc_glx_format_t *__external_linkage
+ glc_glx_find_format (Display *display,
+ int screen,
+ unsigned long mask,
+ const glc_glx_format_t *templ,
+ int count);
+
+ #define GLC_GLX_OPTION_DOUBLEBUFFER_MASK (1 << 0)
+ #define GLC_GLX_OPTION_STEREO_MASK (1 << 1)
+
+ extern glc_glx_format_t *__external_linkage
+ glc_glx_find_visual_format (Display *display,
+ int screen,
+ unsigned long options,
+ Visual *visual);
+
+ extern glc_glx_format_t *__external_linkage
+ glc_glx_find_standard_format (Display *display,
+ int screen,
+ unsigned long options,
+ glc_format_name_t format_name);
+
+ extern XVisualInfo *__external_linkage
+ glc_glx_format_get_visual_info (Display *display,
+ glc_glx_format_t *format);
+
+ extern int __external_linkage
+ glc_glx_format_get_pixelsize (glc_glx_format_t *format);
+
+
+ /* glc_glx_surface.c */
+
+ extern glc_surface_t * __external_linkage
+ glc_glx_surface_create_offscreen (Display *display,
+ int screen,
+ glc_glx_format_t *format,
+ int width,
+ int height);
+
+ extern glc_surface_t * __external_linkage
+ glc_glx_surface_create_for_window (Display *display,
+ int screen,
+ Window window,
+ glc_glx_format_t *format);
+
+ extern void __external_linkage
+ glc_glx_surface_swap_buffers (glc_surface_t *surface);
+
+ void
+ glc_glx_surface_read_pixels (glc_surface_t *surface,
+ int x,
+ int y,
+ unsigned int width,
+ unsigned int height,
+ char *pixels);
+
+ void
+ glc_glx_surface_draw_pixels (glc_surface_t *surface,
+ int x,
+ int y,
+ unsigned int width,
+ unsigned int height,
+ char *pixels);
+ #endif /* LIBGLC_HAS_GLX_BACKEND */
+
+
#if defined(__cplusplus) || defined(c_plusplus)
}
Index: glc_glx_context.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_glx_context.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** glc_glx_context.c 27 Nov 2003 18:47:43 -0000 1.2
--- glc_glx_context.c 5 Dec 2003 01:55:31 -0000 1.3
***************
*** 30,34 ****
#endif
! #include "glc_glxint.h"
#include <stdlib.h>
--- 30,34 ----
#endif
! #include "glcint.h"
#include <stdlib.h>
Index: glc_glx_extension.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_glx_extension.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** glc_glx_extension.c 27 Nov 2003 11:46:41 -0000 1.1.1.1
--- glc_glx_extension.c 5 Dec 2003 01:55:31 -0000 1.2
***************
*** 30,34 ****
#endif
! #include "glc_glxint.h"
#include <stdlib.h>
--- 30,34 ----
#endif
! #include "glcint.h"
#include <stdlib.h>
Index: glc_glx_format.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_glx_format.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** glc_glx_format.c 3 Dec 2003 16:55:50 -0000 1.2
--- glc_glx_format.c 5 Dec 2003 01:55:31 -0000 1.3
***************
*** 30,34 ****
#endif
! #include "glc_glxint.h"
#include <stdlib.h>
--- 30,34 ----
#endif
! #include "glcint.h"
#include <stdlib.h>
Index: glc_glx_info.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_glx_info.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** glc_glx_info.c 4 Dec 2003 12:55:29 -0000 1.3
--- glc_glx_info.c 5 Dec 2003 01:55:31 -0000 1.4
***************
*** 30,34 ****
#endif
! #include "glc_glxint.h"
static glc_glx_context_info_t context_info_dummy = {
--- 30,34 ----
#endif
! #include "glcint.h"
static glc_glx_context_info_t context_info_dummy = {
Index: glc_glx_pbuffer.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_glx_pbuffer.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** glc_glx_pbuffer.c 27 Nov 2003 11:46:15 -0000 1.1.1.1
--- glc_glx_pbuffer.c 5 Dec 2003 01:55:31 -0000 1.2
***************
*** 30,34 ****
#endif
! #include "glc_glxint.h"
static int
--- 30,34 ----
#endif
! #include "glcint.h"
static int
Index: glc_glx_surface.c
===================================================================
RCS file: /cvs/cairo/libglc/src/glc_glx_surface.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** glc_glx_surface.c 4 Dec 2003 12:55:29 -0000 1.3
--- glc_glx_surface.c 5 Dec 2003 01:55:31 -0000 1.4
***************
*** 30,34 ****
#endif
! #include "glc_glxint.h"
static glc_surface_t *
--- 30,34 ----
#endif
! #include "glcint.h"
static glc_surface_t *
Index: glcint.h
===================================================================
RCS file: /cvs/cairo/libglc/src/glcint.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** glcint.h 4 Dec 2003 19:18:08 -0000 1.5
--- glcint.h 5 Dec 2003 01:55:31 -0000 1.6
***************
*** 212,214 ****
--- 212,330 ----
#define DOUBLE_TO_XFIXED(f) ((int) ((f) * 65536))
+
+ #ifdef LIBGLC_HAS_GLX_BACKEND
+
+ typedef struct _glc_glx_surface glc_glx_surface_t;
+
+ typedef struct _glc_glx_list_node_t {
+ struct _glc_glx_list_node_t *next;
+ void *data;
+ } glc_glx_screen_info_node_t,
+ glc_glx_display_info_node_t,
+ glc_glx_format_node_t,
+ glc_glx_context_node_t;
+
+ typedef struct _glc_glx_thread_info_t {
+ glc_glx_display_info_node_t *displays;
+ long int status_mask;
+ } glc_glx_thread_info_t;
+
+ typedef struct _glc_glx_display_info_t {
+ glc_glx_thread_info_t *thread_info;
+ Display *display;
+ glc_glx_screen_info_node_t *screens;
+ } glc_glx_display_info_t;
+
+ typedef struct _glc_glx_context_info_t {
+ struct _glc_glx_context_info_t *previous;
+ Display *display;
+ GLXDrawable drawable;
+ GLXContext context;
+ glc_glx_surface_t *surface;
+ } glc_glx_context_info_t;
+
+ typedef struct _glc_glx_screen_info_t {
+ glc_glx_display_info_t *display_info;
+ int screen;
+ glc_glx_format_node_t *formats;
+ glc_glx_context_node_t *contexts;
+ glc_glx_context_info_t *context_stack;
+ GLXPixmap root_drawable;
+ GLXContext root_context;
+ GLXPixmap current_drawable;
+ GLXContext current_context;
+ long int feature_mask;
+ } glc_glx_screen_info_t;
+
+ typedef struct _glc_glx_fbid_t {
+ XID fbid;
+ glc_glx_format_type_t type;
+ } glc_glx_fbid_t;
+
+ typedef struct _glc_glx_context_t {
+ GLXContext context;
+ unsigned int ref_count;
+ glc_glx_screen_info_t *screen_info;
+ union {
+ glc_glx_fbid_t fb;
+ VisualID visual;
+ } id;
+ } glc_glx_context_t;
+
+ struct _glc_glx_surface {
+ glc_surface_t base;
+
+ glc_glx_screen_info_t *screen_info;
+ glc_glx_context_t *context;
+ glc_glx_format_t *format;
+ GLXDrawable drawable;
+ };
+
+ extern void __internal_linkage
+ glc_glx_query_extensions (glc_glx_screen_info_t *screen_info);
+
+ extern glc_glx_thread_info_t *__internal_linkage
+ glc_glx_thread_info_get (void);
+
+ extern glc_glx_display_info_t *__internal_linkage
+ glc_glx_display_info_get (Display *display);
+
+ extern glc_glx_screen_info_t *__internal_linkage
+ glc_glx_screen_info_get (Display *display,
+ int screen);
+
+ extern glc_glx_context_t *__internal_linkage
+ glc_glx_context_get (glc_glx_screen_info_t *screen_info,
+ glc_glx_format_t *format);
+
+ extern void __internal_linkage
+ glc_glx_context_release (glc_glx_context_t *context);
+
+ extern void __internal_linkage
+ glc_glx_context_push_current (glc_glx_context_t *context,
+ glc_glx_surface_t *surface,
+ GLXDrawable drawable);
+
+ extern glc_glx_surface_t * __internal_linkage
+ glc_glx_context_pop_current (glc_glx_context_t *context);
+
+ extern void __internal_linkage
+ glc_glx_query_formats (glc_glx_screen_info_t *screen_info);
+
+ extern GLenum __internal_linkage
+ glc_glx_surface_get_glformat (glc_glx_surface_t *surface);
+
+ extern GLXPbuffer __internal_linkage
+ glc_glx_pbuffer_create (Display *display,
+ GLXFBConfig fbconfig,
+ int width,
+ int height);
+
+ extern void __internal_linkage
+ glc_glx_pbuffer_destroy (Display *display,
+ GLXPbuffer pbuffer);
+
+ #endif /* LIBGLC_HAS_GLX_BACKEND */
+
+
#endif /* GLCINT_H_INCLUDED */
--- glc-glx.h DELETED ---
--- glc_glxint.h DELETED ---
- Previous message: [cairo-commit] libglc libglc-glx.pc.in,NONE,1.1 ChangeLog,1.9,1.10 Makefile.am,1.1.1.1,1.2 configure.in,1.1.1.1,1.2 acconfig.h,1.1.1.1,NONE libglc.pc.in,1.1.1.1,NONE
- Next message: [cairo-commit] libglc/src glc-config.h.in,NONE,1.1 glc-config.h,1.1,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list