1 #ifndef MSP_GL_RESOURCES_H_
2 #define MSP_GL_RESOURCES_H_
4 #include <msp/datafile/collection.h>
10 class ResourceManager;
14 A collection class for GL resources. Most useful as a base class for an
15 application-specific collection.
17 class Resources: virtual public DataFile::Collection
20 TextureFilter default_tex_filter;
22 ResourceManager *resource_manager;
27 void set_default_texture_filter(TextureFilter);
29 /** Enables or disables sRGB conversion. If enabled, textures and material
30 colors are converted from sRGB to linear color space when loaded. */
31 void set_srgb_conversion(bool);
33 bool get_srgb_conversion() const { return srgb_conversion; }
35 void set_resource_manager(ResourceManager *);
38 Texture2D *create_texture2d(const std::string &);