1 // Copyright (C)2005, 2006 Sun Microsystems, Inc. 2 // Copyright (C)2014 D. R. Commander 3 // 4 // This library is free software and may be redistributed and/or modified under 5 // the terms of the wxWindows Library License, Version 3.1 or (at your option) 6 // any later version. The full license is in the LICENSE.txt file included 7 // with this distribution. 8 // 9 // This library is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // wxWindows Library License for more details. 13 14 #ifndef __GLFRAME_H 15 #define __GLFRAME_H 16 17 // Frame drawn using OpenGL 18 19 #include <GL/glx.h> 20 #include "Frame.h" 21 22 23 namespace vglcommon 24 { 25 class GLFrame : public Frame 26 { 27 public: 28 29 GLFrame(char *dpystring, Window win); 30 GLFrame(Display *dpy, Window win); 31 ~GLFrame(void); 32 void init(rrframeheader &h, bool stereo); 33 GLFrame &operator= (CompressedFrame &cf); 34 void redraw(void); 35 void drawTile(int x, int y, int width, int height); 36 void sync(void); 37 38 private: 39 40 void init(void); 41 int glError(void); 42 43 Display *dpy; Window win; 44 GLXContext ctx; 45 tjhandle tjhnd; 46 bool newdpy; 47 }; 48 } 49 50 #endif // __GLFRAME_H 51