source: OGRE/trunk/ogrenew/RenderSystems/GL/include/OgreGLSupport.h @ 692

Revision 692, 2.5 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1#ifndef OGRE_GLSUPPORT_H
2#define OGRE_GLSUPPORT_H
3
4#include "OgreGLPrerequisites.h"
5#include "OgreGLRenderSystem.h"
6
7#include "OgreRenderWindow.h"
8#include "OgreConfigOptionMap.h"
9#include "OgreGLPBuffer.h"
10
11namespace Ogre
12{
13   
14class GLSupport
15{
16public:
17    GLSupport() { }
18    virtual ~GLSupport() { }
19
20    /**
21    * Add any special config values to the system.
22    * Must have a "Full Screen" value that is a bool and a "Video Mode" value
23    * that is a string in the form of wxh
24    */
25    virtual void addConfig() = 0;
26
27        virtual void setConfigOption(const String &name, const String &value);
28
29    /**
30    * Make sure all the extra options are valid
31    * @return string with error message
32    */
33    virtual String validateConfig() = 0;
34
35        virtual ConfigOptionMap& getConfigOptions(void);
36
37        virtual RenderWindow* createWindow(bool autoCreateWindow, GLRenderSystem* renderSystem, const String& windowTitle) = 0;
38
39        /// @copydoc RenderSystem::createRenderWindow
40        virtual RenderWindow* newWindow(const String &name, unsigned int width, unsigned int height,
41                bool fullScreen, const NameValuePairList *miscParams = 0) = 0;
42
43    virtual bool supportsPBuffers();
44    virtual GLPBuffer *createPBuffer(PixelComponentType format, size_t width, size_t height);
45
46    /**
47    * Start anything special
48    */
49    virtual void start() = 0;
50    /**
51    * Stop anything special
52    */
53    virtual void stop() = 0;
54
55    /**
56    * get vendor information
57    */
58    const String& getGLVendor(void) const
59    {
60        return mVendor;
61    }
62
63    /**
64    * get version information
65    */
66    const String& getGLVersion(void) const
67    {
68        return mVersion;
69    }
70
71    /**
72    * compare GL version numbers
73    */
74    bool checkMinGLVersion(const String& v) const;
75
76    /**
77    * Check if an extension is available
78    */
79    virtual bool checkExtension(const String& ext) const;
80    /**
81    * Get the address of a function
82    */
83    virtual void* getProcAddress(const String& procname) = 0;
84
85    /** Intialises GL extensions, must be done AFTER the GL context has been
86        established.
87    */
88    virtual void initialiseExtensions();
89
90protected:
91        // Stored options
92    ConfigOptionMap mOptions;
93
94        // This contains the complete list of supported extensions
95    std::set<String> extensionList;
96private:
97    String mVersion;
98    String mVendor;
99
100}; // class GLSupport
101
102}; // namespace Ogre
103
104#endif // OGRE_GLSUPPORT_H
Note: See TracBrowser for help on using the repository browser.