OGRE  1.8
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreGLSupport.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef OGRE_GLSUPPORT_H
29 #define OGRE_GLSUPPORT_H
30 
31 #include "OgreGLPrerequisites.h"
32 #include "OgreGLRenderSystem.h"
33 
34 #include "OgreRenderWindow.h"
35 #include "OgreConfigOptionMap.h"
36 #include "OgreGLPBuffer.h"
37 
38 namespace Ogre
39 {
40 
42 {
43 public:
44  GLSupport() { }
45  virtual ~GLSupport() { }
46 
52  virtual void addConfig() = 0;
53 
54  virtual void setConfigOption(const String &name, const String &value);
55 
60  virtual String validateConfig() = 0;
61 
62  virtual ConfigOptionMap& getConfigOptions(void);
63 
64  virtual RenderWindow* createWindow(bool autoCreateWindow, GLRenderSystem* renderSystem, const String& windowTitle) = 0;
65 
67  virtual RenderWindow* newWindow(const String &name, unsigned int width, unsigned int height,
68  bool fullScreen, const NameValuePairList *miscParams = 0) = 0;
69 
70  virtual bool supportsPBuffers();
71  virtual GLPBuffer *createPBuffer(PixelComponentType format, size_t width, size_t height);
72 
76  virtual void start() = 0;
80  virtual void stop() = 0;
81 
85  const String& getGLVendor(void) const
86  {
87  return mVendor;
88  }
89 
93  const String& getGLVersion(void) const
94  {
95  return mVersion;
96  }
97 
101  bool checkMinGLVersion(const String& v) const;
102 
106  virtual bool checkExtension(const String& ext) const;
110  virtual void* getProcAddress(const String& procname) = 0;
111 
115  virtual void initialiseExtensions();
116 
118  virtual unsigned int getDisplayMonitorCount() const
119  {
120  return 1;
121  }
122 
123 protected:
124  // Stored options
126 
127  // This contains the complete list of supported extensions
129 private:
132 
133 }; // class GLSupport
134 
135 } // namespace Ogre
136 
137 #endif // OGRE_GLSUPPORT_H
Manages the target rendering window.
virtual unsigned int getDisplayMonitorCount() const
Gets the number of display monitors.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:553
const String & getGLVendor(void) const
Get vendor information.
Definition: OgreGLSupport.h:85
#define _OgreGLExport
virtual ~GLSupport()
Definition: OgreGLSupport.h:45
PixelComponentType
Pixel component format.
set< String >::type extensionList
map< String, ConfigOption >::type ConfigOptionMap
An off-screen rendering context.
Definition: OgreGLPBuffer.h:38
ConfigOptionMap mOptions
_StringBase String
const String & getGLVersion(void) const
Get version information.
Definition: OgreGLSupport.h:93
Implementation of GL as a rendering system.