Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OgreGLSupport.h

Go to the documentation of this file.
00001 #ifndef OGRE_GLSUPPORT_H
00002 #define OGRE_GLSUPPORT_H
00003 
00004 #include "OgreGLPrerequisites.h"
00005 #include "OgreGLRenderSystem.h"
00006 
00007 #include "OgreRenderWindow.h"
00008 #include "OgreConfigOptionMap.h"
00009 
00010 namespace Ogre
00011 {
00012     
00013 class GLSupport
00014 {
00015 public:
00016     GLSupport() { }
00017     virtual ~GLSupport() { }
00018 
00024     virtual void addConfig() = 0;
00025 
00026     virtual void setConfigOption(const String &name, const String &value);
00027 
00032     virtual String validateConfig() = 0;
00033 
00034     virtual ConfigOptionMap& getConfigOptions(void);
00035 
00036     
00037     virtual RenderWindow* createWindow(bool autoCreateWindow, GLRenderSystem* renderSystem) = 0;
00038 
00042     virtual RenderWindow* newWindow(const String& name, unsigned int width, unsigned int height, unsigned int colourDepth,
00043             bool fullScreen, int left, int top, bool depthBuffer, RenderWindow* parentWindowHandle,
00044             bool vsync) = 0;
00045 
00049     virtual void start() = 0;
00053     virtual void stop() = 0;
00054 
00058     virtual void begin_context()
00059     { }
00060 
00064     virtual void end_context()
00065     { }
00066 
00070     const String& getGLVendor(void) const
00071     {
00072         return mVendor;
00073     }
00074 
00078     const String& getGLVersion(void) const
00079     {
00080         return mVersion;
00081     }
00082 
00086     bool checkMinGLVersion(const String& v) const;
00087 
00091     virtual bool checkExtension(const String& ext) const;
00095     virtual void* getProcAddress(const String& procname) = 0;
00099     virtual void initialiseExtensions(void);
00100 
00101 protected:
00102     // Stored options
00103     ConfigOptionMap mOptions;
00104 
00105 private:
00106     // This contains the complete list of supported extensions
00107     std::set<String> extensionList;
00108     String mVersion;
00109     String mVendor;
00110 
00111 }; // class GLSupport
00112 
00113 }; // namespace Ogre
00114 
00115 #endif // OGRE_GLSUPPORT_H

Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:10:12 2004