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, const String& windowTitle) = 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 00060 virtual void begin_context(RenderTarget *_target = 0) 00061 { 00062 } 00063 00067 virtual void end_context() 00068 { } 00069 00073 const String& getGLVendor(void) const 00074 { 00075 return mVendor; 00076 } 00077 00081 const String& getGLVersion(void) const 00082 { 00083 return mVersion; 00084 } 00085 00089 bool checkMinGLVersion(const String& v) const; 00090 00094 virtual bool checkExtension(const String& ext) const; 00098 virtual void* getProcAddress(const String& procname) = 0; 00099 00100 void setExternalWindowHandle(void* hwnd) { } 00101 00105 virtual void initialiseExtensions(void); 00106 00107 virtual void resizeRepositionWindow(void * window){m_windowToResize = window;}; 00108 virtual void resizeReposition(void*){;}; // should change to pure when it is implemented for all cases 00109 00110 protected: 00111 // Stored options 00112 ConfigOptionMap mOptions; 00113 00114 void *m_windowToResize; 00115 00116 private: 00117 // This contains the complete list of supported extensions 00118 std::set<String> extensionList; 00119 String mVersion; 00120 String mVendor; 00121 00122 }; // class GLSupport 00123 00124 }; // namespace Ogre 00125 00126 #endif // OGRE_GLSUPPORT_H
Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:48:26 2004