OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreGL3PlusSupport.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-2014 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 
29 #ifndef __GL3PlusSupport_H__
30 #define __GL3PlusSupport_H__
31 
33 #include "OgreRenderWindow.h"
34 #include "OgreConfigOptionMap.h"
35 
36 namespace Ogre
37 {
38  class GL3PlusRenderSystem;
39 
41  {
42  public:
44  virtual ~GL3PlusSupport() { }
45 
51  virtual void addConfig() = 0;
52  virtual void setConfigOption(const String &name, const String &value);
53 
58  virtual String validateConfig() = 0;
59  virtual ConfigOptionMap& getConfigOptions(void);
60  virtual RenderWindow* createWindow(bool autoCreateWindow,
61  GL3PlusRenderSystem *renderSystem,
62  const String& windowTitle) = 0;
63 
65  virtual RenderWindow* newWindow(const String &name,
66  unsigned int width, unsigned int height,
67  bool fullScreen,
68  const NameValuePairList *miscParams = 0) = 0;
69 
73  const String& getGLVendor(void) const
74  {
75  return mVendor;
76  }
77 
81  const String& getGLVersion(void) const
82  {
83  return mVersion;
84  }
85 
89  const String& getShaderCachePath(void) const
90  {
91  return mShaderCachePath;
92  }
93 
97  const String& getShaderLibraryPath(void) const
98  {
99  return mShaderLibraryPath;
100  }
101 
106  {
107  mShaderCachePath = path;
108  }
109 
114  {
115  mShaderLibraryPath = path;
116  }
117 
121  bool checkMinGLVersion(const String& v) const;
122 
126  virtual void *getProcAddress(const String& procname) = 0;
127 
131  virtual void initialiseExtensions();
132 
136  virtual bool checkExtension(const String& ext) const;
137 
139  virtual unsigned int getDisplayMonitorCount() const
140  {
141  return 1;
142  }
143 
147  virtual void start() = 0;
151  virtual void stop() = 0;
152 
153  private:
158 
159  protected:
160  // Stored options
162 
163  // This contains the complete list of supported extensions
165  };
166 
167 }
168 
169 #endif
Manages the target rendering window.
const String & getShaderCachePath(void) const
Get shader cache path.
const String & getGLVendor(void) const
Get vendor information.
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:550
const String & getGLVersion(void) const
Get version information.
ConfigOptionMap mOptions
void setShaderCachePath(String path)
Set shader cache path.
map< String, ConfigOption >::type ConfigOptionMap
set< String >::type extensionList
#define _OgreGL3PlusExport
_StringBase String
void setShaderLibraryPath(String path)
Set shader library path.
Implementation of GL 3 as a rendering system.
const String & getShaderLibraryPath(void) const
Get shader library path.