OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreGLESSupport.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) 2008 Renato Araujo Oliveira Filho <renatox@gmail.com>
8 Copyright (c) 2000-2014 Torus Knot Software Ltd
9 
10 Permission is hereby granted, free of charge, to any person obtaining a copy
11 of this software and associated documentation files (the "Software"), to deal
12 in the Software without restriction, including without limitation the rights
13 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14 copies of the Software, and to permit persons to whom the Software is
15 furnished to do so, subject to the following conditions:
16 
17 The above copyright notice and this permission notice shall be included in
18 all copies or substantial portions of the Software.
19 
20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26 THE SOFTWARE.
27 -----------------------------------------------------------------------------
28 */
29 
30 #ifndef __GLESSupport_H__
31 #define __GLESSupport_H__
32 
33 #include "OgreGLESPrerequisites.h"
34 #include "OgreRenderWindow.h"
35 #include "OgreConfigOptionMap.h"
36 
37 namespace Ogre
38 {
39  class GLESRenderSystem;
40  class GLESPBuffer;
41  class GLESStateCacheManager;
42 
44  {
45  public:
46  GLESSupport() : mStateCacheMgr(0) { }
47  virtual ~GLESSupport() { }
48 
54  virtual void addConfig() = 0;
55  virtual void setConfigOption(const String &name, const String &value);
56 
61  virtual String validateConfig() = 0;
62  virtual ConfigOptionMap& getConfigOptions(void);
63  virtual RenderWindow* createWindow(bool autoCreateWindow,
64  GLESRenderSystem *renderSystem,
65  const String& windowTitle) = 0;
66 
68  virtual RenderWindow* newWindow(const String &name,
69  unsigned int width, unsigned int height,
70  bool fullScreen,
71  const NameValuePairList *miscParams = 0) = 0;
72 
76  const String& getGLVendor(void) const
77  {
78  return mVendor;
79  }
80 
84  const String& getGLVersion(void) const
85  {
86  return mVersion;
87  }
88 
92  virtual void *getProcAddress(const String& procname) = 0;
93 
97  virtual void initialiseExtensions();
98 
102  virtual bool checkExtension(const String& ext) const;
103 
104  virtual unsigned int getDisplayMonitorCount() const
105  {
106  return 1;
107  }
108 
113  {
114  return mStateCacheMgr;
115  }
116 
121  {
122  mStateCacheMgr = stateCacheMgr;
123  }
124 
128  virtual void start() = 0;
132  virtual void stop() = 0;
133 
134  virtual GLESPBuffer *createPBuffer(PixelComponentType format, size_t width, size_t height) = 0;
135  private:
138 
139  protected:
140  // Stored options
142 
143  // This contains the complete list of supported extensions
144  std::set<String> extensionList;
145 
147  };
148 
149 }
150 
151 #endif
Manages the target rendering window.
GLESStateCacheManager * getStateCacheManager() const
Get the state cache manager.
const String & getGLVersion(void) const
Get version information.
An in memory cache of the OpenGL ES state.
GLESStateCacheManager * mStateCacheMgr
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:550
ConfigOptionMap mOptions
#define _OgreGLESExport
virtual ~GLESSupport()
virtual unsigned int getDisplayMonitorCount() const
PixelComponentType
Pixel component format.
void setStateCacheManager(GLESStateCacheManager *stateCacheMgr)
Set a valid state cache manager.
map< String, ConfigOption >::type ConfigOptionMap
const String & getGLVendor(void) const
Get vendor information.
Implementation of GL as a rendering system.
_StringBase String
std::set< String > extensionList