BRL-CAD
fb_ogl.h
Go to the documentation of this file.
1 /* F B _ O G L . H
2  * BRL-CAD
3  *
4  * Copyright (c) 2014 United States Government as represented by
5  * the U.S. Army Research Laboratory.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * version 2.1 as published by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this file; see the file named COPYING for more
18  * information.
19  */
20 /** @addtogroup if */
21 /** @{*/
22 /** @file fb_ogl.h
23  *
24  * Structure holding information necessary for embedding a
25  * framebuffer in an X OpenGL parent window. This is NOT public API
26  * for libfb, and is not guaranteed to be stable from one
27  * release to the next.
28  *
29  */
30 /** @} */
31 
32 #ifdef FB_USE_INTERNAL_API
33 #ifdef IF_OGL
34 #include "common.h"
35 # ifdef HAVE_X11_XLIB_H
36 # include <X11/Xlib.h>
37 # include <X11/Xutil.h>
38 # endif
39 /* glx.h on Mac OS X (and perhaps elsewhere) defines a slew of
40  * * * parameter names that shadow system symbols. protect the system
41  * * * symbols by redefining the parameters prior to header inclusion.
42  * * */
43 # define j1 J1
44 # define y1 Y1
45 # define read rd
46 # define index idx
47 # define access acs
48 # define remainder rem
49 # ifdef HAVE_GL_GLX_H
50 # include <GL/glx.h>
51 # endif
52 # undef remainder
53 # undef access
54 # undef index
55 # undef read
56 # undef y1
57 # undef j1
58 # ifdef HAVE_GL_GL_H
59 # include <GL/gl.h>
60 # endif
61 
62 struct ogl_fb_info {
63  Display *dpy;
64  Window win;
65  Colormap cmap;
66  XVisualInfo *vip;
67  GLXContext glxc;
68  int double_buffer;
69  int soft_cmap;
70 };
71 #endif /* IF_OGL */
72 #endif /* FB_USE_INTERNAL_API */
73 
74 /*
75  * Local Variables:
76  * mode: C
77  * tab-width: 8
78  * indent-tabs-mode: t
79  * c-file-style: "stroustrup"
80  * End:
81  * ex: shiftwidth=4 tabstop=8
82  */
long Display
Definition: dm_xvars.h:49
Header file for the BRL-CAD common definitions.
long Colormap
Definition: dm_xvars.h:51
long Window
Definition: dm_xvars.h:50