GTKGLContext.h
Go to the documentation of this file.
00001 // ****************************************************************************
00002 // Filename:  GTKGLContext.h
00003 // Author:    Florian Hecht
00004 // Date:      2009
00005 // ****************************************************************************
00006 
00007 
00008 #ifndef _GTK_GL_CONTEXT_H_
00009 #define _GTK_GL_CONTEXT_H_
00010 
00011 
00012 // ****************************************************************************
00013 // Necessary includes
00014 // ****************************************************************************
00015 
00016 #include <GL/glx.h>
00017 #include <GL/gl.h>
00018 
00019 
00020 // ****************************************************************************
00021 // Forward declarations and typedefs
00022 // ****************************************************************************
00023 
00024 struct _GdkDrawable;
00025 typedef _GdkDrawable GdkDrawable;
00026 
00027 typedef _GdkDrawable GdkPixmap;
00028 
00029 typedef _GdkDrawable GdkWindow;
00030 
00031 struct _GdkVisual;
00032 typedef _GdkVisual GdkVisual;
00033 
00034 
00035 
00036 // ****************************************************************************
00037 // CGTKGLContext
00038 // ****************************************************************************
00039 
00040 class CGTKGLContext
00041 {
00042 public:
00043         CGTKGLContext(CGTKGLContext *shared_context = NULL);
00044         ~CGTKGLContext();
00045         
00046         bool IsInitialized();
00047         
00048         void MakeCurrent(GdkDrawable *drawable);
00049         void SwapBuffers(GdkDrawable *drawable);
00050         void DoneCurrent();
00051         
00052         GdkVisual *GetVisual() { return visual; }
00053 
00054 private:
00055         bool            initialized;
00056         Display         *xdisplay;
00057         GLXContext      glxcontext;
00058         GdkVisual       *visual;
00059 };
00060 
00061 
00062 
00063 #endif /* _GTK_GL_CONTEXT_H_ */


asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Thu Jun 6 2019 21:46:57