mirror of
https://github.com/borgesdan/xn65
synced 2024-12-29 21:54:47 +01:00
19 lines
498 B
C++
19 lines
498 B
C++
|
#include "xna/graphics/gresource.hpp"
|
||
|
#include "xna-dx/framework.hpp"
|
||
|
|
||
|
namespace xna {
|
||
|
GraphicsResource::GraphicsResource(std::shared_ptr<GraphicsDevice> const& device) : BaseGraphicsDevice(device) {}
|
||
|
|
||
|
std::shared_ptr<GraphicsDevice> GraphicsResource::Device() const {
|
||
|
return BaseGraphicsDevice;
|
||
|
}
|
||
|
|
||
|
bool GraphicsResource::Bind(std::shared_ptr<GraphicsDevice> const& device) {
|
||
|
if (!device || device == BaseGraphicsDevice)
|
||
|
return false;
|
||
|
|
||
|
BaseGraphicsDevice = device;
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
}
|