# 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     virtual RenderWindow* createWindow(bool autoCreateWindow, GLRenderSystem* renderSystem, const String& windowTitle) = 0;
    00037
    00039     virtual RenderWindow* newWindow(const String &name, unsigned int width, unsigned int height,
    00040         bool fullScreen, const NameValuePairList *miscParams = 0) = 0;
    00041
    00043     virtual RenderTexture * createRenderTexture( const String & name, unsigned int width, unsigned int height,
    00044             TextureType texType = TEX_TYPE_2D, PixelFormat internalFormat = PF_X8R8G8B8,
    00045             const NameValuePairList *miscParams = 0 );
    00046
    00050     virtual void start() = 0;
    00054     virtual void stop() = 0;
    00055
    00059     const String& getGLVendor(void) const
    00060     {
    00061         return mVendor;
    00062     }
    00063
    00067     const String& getGLVersion(void) const
    00068     {
    00069         return mVersion;
    00070     }
    00071
    00075     bool checkMinGLVersion(const String& v) const;
    00076
    00080     virtual bool checkExtension(const String& ext) const;
    00084     virtual void* getProcAddress(const String& procname) = 0;
    00085
    00089     virtual void initialiseExtensions();
    00090
    00094     virtual void initialiseCapabilities(RenderSystemCapabilities &caps);
    00095
    00096 protected:
    00097     // Stored options
    00098     ConfigOptionMap mOptions;
    00099
    00100     // This contains the complete list of supported extensions
    00101     std::set<String> extensionList;
    00102 private:
    00103     String mVersion;
    00104     String mVendor;
    00105
    00106 }; // class GLSupport
    00107
    00108 }; // namespace Ogre
    00109
    00110 #endif // OGRE_GLSUPPORT_H

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 12:59:45 2006