1
0
mirror of https://github.com/borgesdan/xn65 synced 2024-12-29 21:54:47 +01:00
xn65/inc/xna/graphics/gresource.hpp

27 lines
486 B
C++
Raw Normal View History

2024-04-25 09:43:21 -03:00
#ifndef XNA_GRAPHICS_GRESOURCE_HPP
#define XNA_GRAPHICS_GRESOURCE_HPP
#include "../default.hpp"
namespace xna {
class GraphicsResource {
public:
2024-05-06 15:57:09 -03:00
GraphicsResource(sptr<GraphicsDevice> const& device) : m_device(device){}
2024-04-25 09:43:21 -03:00
virtual ~GraphicsResource(){}
2024-05-06 15:57:09 -03:00
virtual bool Bind(sptr<GraphicsDevice> const& device) {
2024-05-22 10:56:16 -03:00
if (!device || device == m_device)
2024-04-25 09:43:21 -03:00
return false;
m_device = device;
return true;
}
protected:
2024-05-06 15:57:09 -03:00
sptr<GraphicsDevice> m_device = nullptr;
2024-04-25 09:43:21 -03:00
};
}
#endif