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

displaycard_glx.h

Go to the documentation of this file.
00001 /*
00002         $Id: displaycard_glx.h,v 1.4 2001/03/10 18:21:20 japj Exp $
00003 
00004         ------------------------------------------------------------------------
00005         ClanLib, the platform independent game SDK.
00006 
00007         This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00008         version 2. See COPYING for details.
00009 
00010         For a total list of contributers see CREDITS.
00011 
00012         ------------------------------------------------------------------------
00013 */
00014 
00015 #ifndef header_displaycard_glx
00016 #define header_displaycard_glx
00017 
00018 #ifdef USE_OPENGL
00019 
00020 #include "Display/Display/X11/display_xwindow.h"
00021 #include "Display/Display/X11/x11_resolution.h"
00022 #include "GL/Generic/displaycard_gl_generic.h"
00023 #include <GL/glx.h>
00024 #include <iostream>
00025 
00026 class CL_GLX_DisplayCard : public CL_GL_DisplayCard_Generic
00027 {
00028 public:
00029         CL_GLX_DisplayCard(
00030                 Display *dpy,
00031                 Window root,
00032                 int card_no);
00033 
00034         virtual ~CL_GLX_DisplayCard();
00035 
00036         // CL_XWindow_CompatibleCard:
00037         // --------------------------
00038         
00039         virtual Window get_window() { return win; }
00040         virtual Display *get_display() { return dpy; }
00041         virtual Window get_root() { return root; }
00042 
00043         // CL_GL_DisplayCard_Generic
00044         // -------------------------
00045         
00046         virtual int get_max_texture_size() { return max_texture_size; }
00047 
00048         // CL_DisplayCard functions:
00049         // -------------------------
00050 
00051         virtual void flip_display(bool sync=false);
00052         virtual void put_display(const class CL_Rect &rect);
00053         virtual void set_videomode(int width, int height, int bpp, bool fullscreen, bool allow_resize, bool video_memory);
00054 
00055         virtual std::string get_name() { return "GLX Display"; }
00056         
00057 private:
00058 //      bool initialized;
00059         
00060         Window root;
00061         Window win;
00062         Display *dpy;
00063 
00064         GLXContext ctx;
00065         GLint max_texture_size;
00066 
00067         CL_X11Resolution resolution;
00068 };
00069 
00070 #endif
00071 
00072 #endif

Generated at Wed Apr 4 19:54:00 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001