GTKGLContext.h
Go to the documentation of this file.
1 // ****************************************************************************
2 // Filename: GTKGLContext.h
3 // Author: Florian Hecht
4 // Date: 2009
5 // ****************************************************************************
6 
7 
8 #ifndef _GTK_GL_CONTEXT_H_
9 #define _GTK_GL_CONTEXT_H_
10 
11 
12 // ****************************************************************************
13 // Necessary includes
14 // ****************************************************************************
15 
16 #include <GL/glx.h>
17 #include <GL/gl.h>
18 
19 
20 // ****************************************************************************
21 // Forward declarations and typedefs
22 // ****************************************************************************
23 
24 struct _GdkDrawable;
25 typedef _GdkDrawable GdkDrawable;
26 
27 typedef _GdkDrawable GdkPixmap;
28 
29 typedef _GdkDrawable GdkWindow;
30 
31 struct _GdkVisual;
32 typedef _GdkVisual GdkVisual;
33 
34 
35 
36 // ****************************************************************************
37 // CGTKGLContext
38 // ****************************************************************************
39 
41 {
42 public:
43  CGTKGLContext(CGTKGLContext *shared_context = NULL);
45 
46  bool IsInitialized();
47 
48  void MakeCurrent(GdkDrawable *drawable);
49  void SwapBuffers(GdkDrawable *drawable);
50  void DoneCurrent();
51 
52  GdkVisual *GetVisual() { return visual; }
53 
54 private:
56  Display *xdisplay;
57  GLXContext glxcontext;
59 };
60 
61 
62 
63 #endif /* _GTK_GL_CONTEXT_H_ */
_GdkDrawable GdkWindow
Definition: GTKGLContext.h:29
_GdkDrawable GdkPixmap
Definition: GTKGLContext.h:27
GdkVisual * visual
Definition: GTKGLContext.h:58
void SwapBuffers(GdkDrawable *drawable)
CGTKGLContext(CGTKGLContext *shared_context=NULL)
GLXContext glxcontext
Definition: GTKGLContext.h:57
_GdkVisual GdkVisual
Definition: GTKGLContext.h:31
void DoneCurrent()
_GdkDrawable GdkDrawable
Definition: GTKGLContext.h:24
GdkVisual * GetVisual()
Definition: GTKGLContext.h:52
bool IsInitialized()
Display * xdisplay
Definition: GTKGLContext.h:56
void MakeCurrent(GdkDrawable *drawable)


asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Mon Dec 2 2019 03:47:28