OgreGLES2Support.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 
29 #ifndef __GLES2Support_H__
30 #define __GLES2Support_H__
31 
32 #include "OgreGLES2Prerequisites.h"
33 #include "OgreRenderWindow.h"
34 #include "OgreConfigOptionMap.h"
35 
36 namespace Ogre
37 {
38  class GLES2RenderSystem;
39  class GLES2StateCacheManager;
40 
42  {
43  public:
44  GLES2Support() : mStateCacheMgr(0) { }
45  virtual ~GLES2Support() { }
46 
52  virtual void addConfig() = 0;
53  virtual void setConfigOption(const String &name, const String &value);
54 
59  virtual String validateConfig() = 0;
60  virtual ConfigOptionMap& getConfigOptions(void);
61  virtual RenderWindow* createWindow(bool autoCreateWindow,
62  GLES2RenderSystem *renderSystem,
63  const String& windowTitle) = 0;
64 
66  virtual RenderWindow* newWindow(const String &name,
67  unsigned int width, unsigned int height,
68  bool fullScreen,
69  const NameValuePairList *miscParams = 0) = 0;
70 
74  const String& getGLVendor(void) const
75  {
76  return mVendor;
77  }
78 
82  const String& getGLVersion(void) const
83  {
84  return mVersion;
85  }
86 
90  const String& getShaderCachePath(void) const
91  {
92  return mShaderCachePath;
93  }
94 
98  const String& getShaderLibraryPath(void) const
99  {
100  return mShaderLibraryPath;
101  }
102 
107  {
108  mShaderCachePath = path;
109  }
110 
115  {
116  mShaderLibraryPath = path;
117  }
118 
122  virtual void *getProcAddress(const String& procname) = 0;
123 
127  virtual void initialiseExtensions();
128 
132  virtual bool checkExtension(const String& ext) const;
133 
135  virtual unsigned int getDisplayMonitorCount() const
136  {
137  return 1;
138  }
139 
144  {
145  return mStateCacheMgr;
146  }
147 
152  {
153  mStateCacheMgr = stateCacheMgr;
154  }
155 
159  virtual void start() = 0;
163  virtual void stop() = 0;
164 
165  private:
170 
171  protected:
172  // Stored options
174 
175  // This contains the complete list of supported extensions
177 
178  // State cache management
180  };
181 
182 }
183 
184 #endif
void setShaderCachePath(String path)
Set shader cache path.
#define _OgreGLES2Export
Implementation of GL ES 2.x as a rendering system.
virtual unsigned int getDisplayMonitorCount() const
Gets the number of display monitors.
const String & getShaderLibraryPath(void) const
Get shader library path.
const String & getGLVersion(void) const
Get version information.
An in memory cache of the OpenGL ES state.
const String & getGLVendor(void) const
Get vendor information.
void setShaderLibraryPath(String path)
Set shader library path.
map< String, ConfigOption >::type ConfigOptionMap
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:550
GLES2StateCacheManager * getStateCacheManager() const
Get the state cache manager.
_StringBase String
set< String >::type extensionList
This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info...
void setStateCacheManager(GLES2StateCacheManager *stateCacheMgr)
Set a valid state cache manager.
Manages the target rendering window.
const String & getShaderCachePath(void) const
Get shader cache path.
ConfigOptionMap mOptions
GLES2StateCacheManager * mStateCacheMgr

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 Sun Oct 22 2017 04:04:15