Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

glx.h

Go to the documentation of this file.
00001 #ifndef fl_glx_h
00002 #define fl_glx_h
00003 
00004 
00005 #include "fl/X.h"
00006 
00007 #include <GL/glx.h>
00008 
00009 
00010 namespace fl
00011 {
00012   class GLXContext  // Is there an XID associated with this?  If so, it should subclass Resource.
00013   {
00014   public:
00015         GLXContext (fl::Screen * screen = NULL);  // Chooses a default visual.  If screen is not specified, uses default screen.
00016         virtual ~GLXContext ();
00017 
00018         bool isDirect () const;
00019 
00020         fl::Screen * screen;
00021         ::GLXContext context;
00022         bool         doubleBuffer;
00023   };
00024 
00025   class GLXDrawable : public virtual Drawable
00026   {
00027   public:
00028         void makeCurrent (fl::GLXContext & context) const;
00029         void swapBuffers () const;
00030   };
00031 
00032   class GLXWindow : public Window, public GLXDrawable
00033   {
00034   public:
00035         GLXWindow () : fl::Window (fl::Display::getPrimary ()->defaultScreen ()) {};
00036         GLXWindow (fl::Window & parent, int width = 100, int height = 100, int x = 0, int y = 0) : fl::Window (parent, width, height, x, y) {};
00037         GLXWindow (fl::Screen & screen, int width = 100, int height = 100, int x = 0, int y = 0) : fl::Window (screen, width, height, x, y) {};
00038   };
00039 }
00040 
00041 
00042 #endif

Generated on Thu Dec 9 17:13:24 2004 for fl by doxygen1.2.18