This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
/
SDL_winrtrenderer.h
32 lines (25 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
#pragma once
#include "Direct3DBase.h"
struct VertexPositionColor
{
DirectX::XMFLOAT3 pos;
DirectX::XMFLOAT3 color;
};
// This class renders a simple spinning cube.
12
ref class SDL_winrtrenderer sealed : public Direct3DBase
13
14
{
public:
15
SDL_winrtrenderer();
16
17
18
19
20
21
22
23
24
25
26
27
28
// Direct3DBase methods.
virtual void CreateDeviceResources() override;
virtual void Render() override;
private:
bool m_loadingComplete;
Microsoft::WRL::ComPtr<ID3D11InputLayout> m_inputLayout;
Microsoft::WRL::ComPtr<ID3D11Buffer> m_vertexBuffer;
Microsoft::WRL::ComPtr<ID3D11VertexShader> m_vertexShader;
Microsoft::WRL::ComPtr<ID3D11PixelShader> m_pixelShader;
Microsoft::WRL::ComPtr<ID3D11Buffer> m_constantBuffer;
29
Microsoft::WRL::ComPtr<ID3D11RasterizerState> m_rasterState;
30
31
uint32 m_vertexCount;
32
};