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 
11  class _OgrePrivate GLXGLSupport : public GLSupport
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
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::GLXGLSupport
Definition: include/GLX/OgreGLXGLSupport.h:11
Ogre::GLXGLSupport::ScreenSize
std::pair< uint, uint > ScreenSize
Definition: include/GLX/OgreGLXGLSupport.h:186
Ogre::StringVector
vector< String >::type StringVector
Definition: OgreStringVector.h:45
Ogre::RenderWindow
Manages the target rendering window.
Definition: OgreRenderWindow.h:62
Ogre::GLXContext
Definition: include/GLX/OgreGLXContext.h:36
Ogre::PixelComponentType
PixelComponentType
Pixel component format.
Definition: OgrePixelFormat.h:288
Ogre::GLXGLSupport::VideoModes
std::vector< VideoMode > VideoModes
Definition: include/GLX/OgreGLXGLSupport.h:189
Ogre::GLXGLSupport::mSampleLevels
StringVector mSampleLevels
Definition: include/GLX/OgreGLXGLSupport.h:195
Ogre::GLXGLSupport::VideoMode
std::pair< ScreenSize, Rate > VideoMode
Definition: include/GLX/OgreGLXGLSupport.h:188
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::GLXGLSupport::mAtomState
Atom mAtomState
Definition: include/GLX/OgreGLXGLSupport.h:19
Ogre::GLXGLSupport::mVideoModes
VideoModes mVideoModes
Definition: include/GLX/OgreGLXGLSupport.h:191
Ogre::NameValuePairList
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:550
Ogre::GLXGLSupport::mOriginalMode
VideoMode mOriginalMode
Definition: include/GLX/OgreGLXGLSupport.h:192
Ogre::GLRenderSystem
Implementation of GL as a rendering system.
Definition: OgreGLRenderSystem.h:51
Ogre::GLSupport
Definition: OgreGLSupport.h:43
Ogre::GLXGLSupport::mAtomDeleteWindow
Atom mAtomDeleteWindow
Definition: include/GLX/OgreGLXGLSupport.h:17
Ogre::GLXGLSupport::mCurrentMode
VideoMode mCurrentMode
Definition: include/GLX/OgreGLXGLSupport.h:193
OgreGLSupport.h
Ogre::GLXGLSupport::mGLDisplay
Display * mGLDisplay
Definition: include/GLX/OgreGLXGLSupport.h:182
Ogre::GLXGLSupport::mXDisplay
Display * mXDisplay
Definition: include/GLX/OgreGLXGLSupport.h:183
Ogre::GLXGLSupport::mAtomFullScreen
Atom mAtomFullScreen
Definition: include/GLX/OgreGLXGLSupport.h:18
Ogre::uint
unsigned int uint
Definition: OgrePrerequisites.h:114
Ogre::GLXGLSupport::Rate
short Rate
Definition: include/GLX/OgreGLXGLSupport.h:187
Ogre::GLPBuffer
An off-screen rendering context.
Definition: OgreGLPBuffer.h:38
Ogre::GLXGLSupport::mIsExternalDisplay
bool mIsExternalDisplay
Definition: include/GLX/OgreGLXGLSupport.h:184

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15