mirror of
https://github.com/borgesdan/xn65
synced 2024-12-29 21:54:47 +01:00
Correções em GraphicsDevice
This commit is contained in:
parent
4335323879
commit
126a424a24
@ -178,13 +178,7 @@ namespace xna {
|
|||||||
if (!impl) return nullptr;
|
if (!impl) return nullptr;
|
||||||
|
|
||||||
return impl->_adapter;
|
return impl->_adapter;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GraphicsDevice::Adapter(sptr<GraphicsAdapter> const& adapter) {
|
|
||||||
if (!impl) return;
|
|
||||||
|
|
||||||
impl->_adapter = adapter;
|
|
||||||
}
|
|
||||||
|
|
||||||
xna::Viewport GraphicsDevice::Viewport() const {
|
xna::Viewport GraphicsDevice::Viewport() const {
|
||||||
if (!impl) return {};
|
if (!impl) return {};
|
||||||
@ -202,5 +196,5 @@ namespace xna {
|
|||||||
if (!impl) return;
|
if (!impl) return;
|
||||||
|
|
||||||
impl->_usevsync = use;
|
impl->_usevsync = use;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -450,6 +450,14 @@ namespace xna {
|
|||||||
Immediate
|
Immediate
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class PrimitiveType
|
||||||
|
{
|
||||||
|
TriangleList,
|
||||||
|
TriangleStrip,
|
||||||
|
LineList,
|
||||||
|
LineStrip,
|
||||||
|
};
|
||||||
|
|
||||||
enum RenderTargetUsage {
|
enum RenderTargetUsage {
|
||||||
DiscardContents,
|
DiscardContents,
|
||||||
PreserveContents,
|
PreserveContents,
|
||||||
|
@ -14,11 +14,12 @@ namespace xna {
|
|||||||
bool Initialize();
|
bool Initialize();
|
||||||
bool Present();
|
bool Present();
|
||||||
sptr<GraphicsAdapter> Adapter() const;
|
sptr<GraphicsAdapter> Adapter() const;
|
||||||
void Adapter(sptr<GraphicsAdapter> const& adapter);
|
|
||||||
xna::Viewport Viewport() const;
|
xna::Viewport Viewport() const;
|
||||||
void Viewport(xna::Viewport const& viewport);
|
void Viewport(xna::Viewport const& viewport);
|
||||||
void UseVSync(bool use);
|
void UseVSync(bool use);
|
||||||
|
|
||||||
|
//void DrawPrimitives(PrimitiveType primitiveType, Int startVertex, Int primitiveCount);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
struct PlatformImplementation;
|
struct PlatformImplementation;
|
||||||
uptr<PlatformImplementation> impl = nullptr;
|
uptr<PlatformImplementation> impl = nullptr;
|
||||||
|
@ -246,6 +246,13 @@ namespace xna {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct SwapChain::PlatformImplementation {
|
struct SwapChain::PlatformImplementation {
|
||||||
|
~PlatformImplementation() {
|
||||||
|
if (dxSwapChain) {
|
||||||
|
dxSwapChain->Release();
|
||||||
|
dxSwapChain = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
IDXGISwapChain1* dxSwapChain{ nullptr };
|
IDXGISwapChain1* dxSwapChain{ nullptr };
|
||||||
DXGI_SWAP_CHAIN_DESC1 dxDescription{};
|
DXGI_SWAP_CHAIN_DESC1 dxDescription{};
|
||||||
DXGI_SWAP_CHAIN_FULLSCREEN_DESC dxFullScreenDescription{};
|
DXGI_SWAP_CHAIN_FULLSCREEN_DESC dxFullScreenDescription{};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user