2024-04-25 09:43:21 -03:00
|
|
|
#ifndef XNA_GRAPHICS_GRESOURCE_HPP
|
|
|
|
#define XNA_GRAPHICS_GRESOURCE_HPP
|
|
|
|
|
2024-11-15 11:47:33 -03:00
|
|
|
#include <memory>
|
2024-04-25 09:43:21 -03:00
|
|
|
|
|
|
|
namespace xna {
|
2024-11-15 11:47:33 -03:00
|
|
|
class GraphicsDevice;
|
|
|
|
|
2024-06-06 14:47:39 -03:00
|
|
|
//Queries and prepares resources.
|
2024-04-25 09:43:21 -03:00
|
|
|
class GraphicsResource {
|
|
|
|
public:
|
2024-11-15 11:47:33 -03:00
|
|
|
GraphicsResource(std::shared_ptr<GraphicsDevice> const& device);
|
2024-04-25 09:43:21 -03:00
|
|
|
|
|
|
|
virtual ~GraphicsResource(){}
|
|
|
|
|
2024-11-15 11:47:33 -03:00
|
|
|
virtual bool Bind(std::shared_ptr<GraphicsDevice> const& device);
|
2024-04-25 09:43:21 -03:00
|
|
|
|
2024-06-06 14:47:39 -03:00
|
|
|
//Gets the GraphicsDevice associated with this GraphicsResource.
|
2024-11-15 11:47:33 -03:00
|
|
|
std::shared_ptr<GraphicsDevice> Device() const;
|
2024-04-25 09:43:21 -03:00
|
|
|
|
|
|
|
protected:
|
2024-11-15 11:47:33 -03:00
|
|
|
std::shared_ptr<GraphicsDevice> BaseGraphicsDevice = nullptr;
|
2024-04-25 09:43:21 -03:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|