template<typename TDerived>
class ToyMaker::Resource< TDerived >
The base class for any type whose creation and storage should be managed by the ResourceDatabase.
References to a Resource are ultimately returned as shared pointers the the immediate subclass of this class.
Usage:
A class that wishes to be seen by the ResourceDatabase should have the following signature:
public:
inline static std::string getResourceTypeName() { return "Texture"; }
GLuint textureID,
const std::string& filepath
) :
mID { textureID },
mFilepath { filepath },
mColorBufferDefinition{colorBufferDefinition}
{}
};
The base class for any type whose creation and storage should be managed by the ResourceDatabase.
Definition resource_database.hpp:372
Resource(int explicitlyInitializeMe)
Construct a new resource object.
Definition resource_database.hpp:389
The class representation of textures on this engine, which are a type of Resource used both within an...
Definition texture.hpp:116
Texture(GLuint textureID, const ColorBufferDefinition &colorBufferDefinition, const std::string &filepath="")
Constructs a new texture object which takes ownership of an OpenGL texture handle and engine colorbuf...
Definition texture.cpp:40
A struct containing the definition of a color buffer, using which similar color buffers can be create...
Definition texture.hpp:30
- Todo
- Determine whether it is actually necessary to have all a Resource's construction and assignment operators defined when using the ResourceDatabase for something.
- Template Parameters
-