src/video/windowsrt/SDL_winrtrenderer.h
author David Ludwig <dludwig@pobox.com>
Wed, 21 Nov 2012 23:44:58 -0500
changeset 8350 ecc8c88ed82e
parent 8348 7cdcd6d28c85
child 8367 df577bb2f2d7
permissions -rw-r--r--
WinRT: got SDL_UpdateWindowSurface working, rudimentarily
dludwig@8322
     1
#pragma once
dludwig@8322
     2
dludwig@8322
     3
#include "Direct3DBase.h"
dludwig@8322
     4
dludwig@8322
     5
struct VertexPositionColor
dludwig@8322
     6
{
dludwig@8322
     7
	DirectX::XMFLOAT3 pos;
dludwig@8347
     8
	DirectX::XMFLOAT2 tex;
dludwig@8322
     9
};
dludwig@8322
    10
dludwig@8322
    11
// This class renders a simple spinning cube.
dludwig@8342
    12
ref class SDL_winrtrenderer sealed : public Direct3DBase
dludwig@8322
    13
{
dludwig@8322
    14
public:
dludwig@8342
    15
	SDL_winrtrenderer();
dludwig@8322
    16
dludwig@8322
    17
	// Direct3DBase methods.
dludwig@8322
    18
	virtual void CreateDeviceResources() override;
dludwig@8350
    19
dludwig@8350
    20
internal:
dludwig@8350
    21
	virtual void Render(SDL_Surface * surface, SDL_Rect * rects, int numrects) override;
dludwig@8322
    22
dludwig@8322
    23
private:
dludwig@8322
    24
	bool m_loadingComplete;
dludwig@8322
    25
dludwig@8322
    26
	Microsoft::WRL::ComPtr<ID3D11InputLayout> m_inputLayout;
dludwig@8322
    27
	Microsoft::WRL::ComPtr<ID3D11Buffer> m_vertexBuffer;
dludwig@8322
    28
	Microsoft::WRL::ComPtr<ID3D11VertexShader> m_vertexShader;
dludwig@8322
    29
	Microsoft::WRL::ComPtr<ID3D11PixelShader> m_pixelShader;
dludwig@8347
    30
	Microsoft::WRL::ComPtr<ID3D11Texture2D> m_mainTexture;
dludwig@8347
    31
	Microsoft::WRL::ComPtr<ID3D11ShaderResourceView> m_mainTextureResourceView;
dludwig@8347
    32
	Microsoft::WRL::ComPtr<ID3D11SamplerState> m_mainSampler;
dludwig@8322
    33
dludwig@8342
    34
	uint32 m_vertexCount;
dludwig@8322
    35
};