OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
include/GLX/OgreGLXGLSupport.h
Go to the documentation of this file.
1 #ifndef OGRE_GLXGLSupport_H
2 #define OGRE_GLXGLSupport_H
3 
4 #include "OgreGLSupport.h"
5 
6 #include <GL/glew.h>
7 #include <GL/glxew.h>
8 
9 namespace Ogre {
10 
12  {
13  public:
14  GLXGLSupport();
15  ~GLXGLSupport();
16 
19  Atom mAtomState;
20 
22  void addConfig(void);
23 
25  String validateConfig(void);
26 
28  void setConfigOption(const String &name, const String &value);
29 
31  RenderWindow* createWindow(bool autoCreateWindow, GLRenderSystem* renderSystem, const String& windowTitle);
32 
34  RenderWindow* newWindow(const String &name, unsigned int width, unsigned int height,
35  bool fullScreen, const NameValuePairList *miscParams = 0);
36 
38  GLPBuffer* createPBuffer(PixelComponentType format, size_t width, size_t height);
39 
41  void start();
42 
44  void stop();
45 
47  void initialiseExtensions();
48 
50  void* getProcAddress(const String& procname);
51 
52  // The remaining functions are internal to the GLX Rendersystem:
53 
67  String getDisplayName (void);
68 
76  Display* getGLDisplay(void);
77 
83  Display* getXDisplay(void);
84 
92  void switchMode (uint& width, uint& height, short& frequency);
93 
97  void switchMode (void);
98 
109  bool loadIcon(const String &name, Pixmap *pix, Pixmap *mask);
110 
117  GLXFBConfig getFBConfigFromContext (::GLXContext context);
118 
128  GLXFBConfig getFBConfigFromDrawable (GLXDrawable drawable, unsigned int *width, unsigned int *height);
129 
137  GLXFBConfig selectFBConfig(const int *minAttribs, const int *maxAttribs);
138 
149  GLXFBConfig getFBConfigFromVisualID(VisualID visualid);
150 
154  GLXFBConfig* chooseFBConfig(const GLint *attribList, GLint *nElements);
155 
159  ::GLXContext createNewContext(GLXFBConfig fbConfig, GLint renderType, ::GLXContext shareList, GLboolean direct) const;
160 
164  GLint getFBConfigAttrib(GLXFBConfig fbConfig, GLint attribute, GLint *value);
165 
169  XVisualInfo* getVisualFromFBConfig(GLXFBConfig fbConfig);
170 
171  private:
175  void initialiseGLXEW(void);
176 
180  void refreshConfig(void);
181 
182  Display* mGLDisplay; // used for GL/GLX commands
183  Display* mXDisplay; // used for other X commands and events
185 
186  typedef std::pair<uint, uint> ScreenSize;
187  typedef short Rate;
188  typedef std::pair<ScreenSize, Rate> VideoMode;
189  typedef std::vector<VideoMode> VideoModes;
190 
194 
196  };
197 
198 #if OGRE_THREAD_SUPPORT == 1
199  GLXEWContext* glxewGetContext();
200 #endif
201 }
202 
203 #endif // OGRE_GLXGLSupport_H
std::pair< ScreenSize, Rate > VideoMode
Manages the target rendering window.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:550
std::pair< uint, uint > ScreenSize
PixelComponentType
Pixel component format.
#define _OgrePrivate
Definition: OgrePlatform.h:261
std::vector< VideoMode > VideoModes
vector< String >::type StringVector
An off-screen rendering context.
Definition: OgreGLPBuffer.h:38
_StringBase String
Implementation of GL as a rendering system.
unsigned int uint