00001 /*
00002 File: GLXPane.h
00003
00004 Function:
00005
00006 Author: Andrew Willmott
00007
00008 Copyright: (c) 1999-2000, Andrew Willmott
00009 */
00010
00011 #ifndef __GLXPane__
00012 #define __GLXPane__
00013
00014 #include "gcl/XGraphicsSystem.h"
00015 #include "gcl/GLRenderer.h"
00016 #include <GL/glx.h>
00017
00018 class GLXPane : public GLRenderer, public XEventPane
00019 // event-handling canvas you can draw into
00020 {
00021 public:
00022 GLXPane(Bool doubleBuffer = true);
00023 ~GLXPane();
00024
00025 Void Init();
00026 Void MakeCurrent();
00027 Void Show();
00028 XVisualInfo *GetVisualInfo();
00029
00030 protected:
00031 Bool doubleBuffered;
00032 GLXContext context;
00033
00034 static XVisualInfo *sGLXVisualInfo;
00035 static XVisualInfo *sGLXDblVisualInfo;
00036 };
00037
00038
00039 class GLXOffscreenPane : public GLRenderer, public XOffscreenPane
00040 // offscreen canvas you can draw into
00041 {
00042 public:
00043
00044 GLXOffscreenPane();
00045 ~GLXOffscreenPane();
00046
00047 Void Init();
00048 Void MakeCurrent();
00049 XVisualInfo *GetVisualInfo();
00050
00051 protected:
00052 GLXContext context;
00053 GLXPixmap pixmap;
00054
00055 static XVisualInfo *sGLXVisualInfo;
00056 };
00057
00058 #endif