00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00024
00025 #ifndef SFML_GRAPHICSDEVICE_HPP
00026 #define SFML_GRAPHICSDEVICE_HPP
00027
00029
00031 #include <SFML/Utilities/NonCopyable.hpp>
00032 #include <set>
00033
00034 class sfVideoResource;
00035
00036
00037 namespace sf_private
00038 {
00042 class sfGraphicsDevice : sfNonCopyable
00043 {
00044 public :
00045
00053 static sfGraphicsDevice* GetInstance();
00054
00060 static void Initialize();
00061
00067 static void Shutdown();
00068
00075 static void AddVideoResource(sfVideoResource* Resource);
00076
00083 static void RemoveVideoResource(sfVideoResource* Resource);
00084
00085 public :
00086
00090 struct Capabilities
00091 {
00092 bool NonPowerOfTwoTextures;
00093 bool CanDoPostFX;
00094 bool FrameBufferObject;
00095 int MaxTextureSize;
00096 int MaxTextureUnits;
00097 };
00098
00105 const Capabilities& GetCapabilities() const;
00106
00107 private :
00108
00113 sfGraphicsDevice();
00114
00116
00118 static sfGraphicsDevice* ourInstance;
00119 static unsigned int ourReferences;
00120 static std::set<sfVideoResource*> ourResources;
00121
00123
00125 Capabilities myCapabilities;
00126 };
00127
00128 }
00129
00130 #endif // SFML_GRAPHICSDEVICE_HPP