2024-03-18 15:41:46 -03:00
|
|
|
#ifndef XNA_GRAPHICS_DEVICE_HPP
|
|
|
|
#define XNA_GRAPHICS_DEVICE_HPP
|
|
|
|
|
2024-05-24 22:26:10 -03:00
|
|
|
#include "../default.hpp"
|
2024-03-18 15:41:46 -03:00
|
|
|
|
|
|
|
namespace xna {
|
2024-05-24 22:26:10 -03:00
|
|
|
class GraphicsDevice : public std::enable_shared_from_this<GraphicsDevice> {
|
2024-03-18 15:41:46 -03:00
|
|
|
public:
|
2024-05-24 22:26:10 -03:00
|
|
|
GraphicsDevice();
|
|
|
|
GraphicsDevice(GraphicsDeviceInformation const& info);
|
|
|
|
~GraphicsDevice();
|
|
|
|
void Clear();
|
|
|
|
void Clear(Color const& color);
|
2024-06-05 09:26:33 -03:00
|
|
|
bool Initialize();
|
2024-05-24 22:26:10 -03:00
|
|
|
bool Present();
|
|
|
|
sptr<GraphicsAdapter> Adapter() const;
|
|
|
|
void Adapter(sptr<GraphicsAdapter> const& adapter);
|
|
|
|
xna::Viewport Viewport() const;
|
|
|
|
void Viewport(xna::Viewport const& viewport);
|
|
|
|
void UseVSync(bool use);
|
|
|
|
|
|
|
|
public:
|
|
|
|
struct PlatformImplementation;
|
|
|
|
uptr<PlatformImplementation> impl = nullptr;
|
2024-03-18 15:41:46 -03:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|