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

glxtglwindow.h

00001 /***************************************************************************
00002                           glxtglwindow.h  -  description
00003                              -------------------
00004     begin                : Sun Jan 11 2004
00005     copyright            : (C) 2004 by Jacques Gasselin de Richebourg
00006     email                : jacquesgasselin@hotmail.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU Lesser General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA *
00024  *                                                                         *
00025  ***************************************************************************/
00026 
00027 #ifndef GLXTGLWINDOW_H
00028 #define GLXTGLWINDOW_H
00029 
00030 #include <GL/glx.h>
00031 #include <X11/Xlib.h>
00032 #include <X11/Xatom.h>
00033 #include <TGL/tgl.h>
00034 
00039 class GLXTGLWindow : public GLWindow
00040 {
00041    Display* disp;
00042    Window window;
00043    XVisualInfo* vi;
00044    Colormap colormap;
00045    GLXContext cx;
00046    Atom wmDeleteWindow;
00047    bool doubleBuffered;
00048 
00049 public: 
00050     GLXTGLWindow(GLsizei w, GLsizei h, bool genRenderSet = true);
00051     ~GLXTGLWindow();
00052 
00053    inline Display* getDisplay() const
00054    { return disp; }
00055 
00056    inline Atom getDeleteAtom() const
00057    { return wmDeleteWindow; }
00058    
00060    virtual void create(char* str, char** argv, int argc);
00061 
00062    virtual void init();
00063    virtual void display();
00064    virtual void reshape(GLsizei w, GLsizei h);
00065    virtual void mouse(int b, int state, int x, int y);
00066    virtual void motion(int x, int y);
00067    virtual void keyboard(unsigned char key, int x, int y);
00068    virtual void idle();
00069 
00070    virtual void postRedisplay();
00071    virtual void beginScene();
00072    virtual void endScene();
00073 };
00074 
00075 #endif

Generated on Wed Feb 4 23:11:34 2004 by doxygen 1.3.3