1 #ifndef MSP_GL_RESOURCES_H_
2 #define MSP_GL_RESOURCES_H_
4 #include <msp/datafile/collection.h>
12 class ResourceManager;
16 A collection class for GL resources. Most useful as a base class for an
17 application-specific collection.
19 class Resources: virtual public DataFile::Collection
22 TextureFilter default_tex_filter;
23 float default_tex_anisotropy;
25 ResourceManager *resource_manager;
30 static const DataFile::CollectionSource &get_builtins();
32 void set_default_texture_filter(TextureFilter);
33 void set_default_texture_anisotropy(float);
35 /** Enables or disables sRGB conversion. If enabled, textures and material
36 colors are converted from sRGB to linear color space when loaded. */
37 void set_srgb_conversion(bool);
39 bool get_srgb_conversion() const { return srgb_conversion; }
41 void set_resource_manager(ResourceManager *);
44 Mesh *create_mesh(const std::string &);
45 Texture2D *create_texture2d(const std::string &);
46 Program *create_program(const std::string &);