src/video/windowsrt/SDL_winrtrenderer.h
changeset 8384 bc7a52629e1e
parent 8375 e33eb49b7f42
child 8400 1315402d9028
     1.1 --- a/src/video/windowsrt/SDL_winrtrenderer.h	Tue Jan 08 22:50:29 2013 -0500
     1.2 +++ b/src/video/windowsrt/SDL_winrtrenderer.h	Tue Jan 08 23:11:22 2013 -0500
     1.3 @@ -5,57 +5,57 @@
     1.4  
     1.5  struct VertexPositionColor
     1.6  {
     1.7 -	DirectX::XMFLOAT3 pos;
     1.8 -	DirectX::XMFLOAT2 tex;
     1.9 +    DirectX::XMFLOAT3 pos;
    1.10 +    DirectX::XMFLOAT2 tex;
    1.11  };
    1.12  
    1.13  // Helper class that initializes DirectX APIs for 3D rendering.
    1.14  ref class SDL_winrtrenderer
    1.15  {
    1.16  internal:
    1.17 -	SDL_winrtrenderer();
    1.18 +    SDL_winrtrenderer();
    1.19  
    1.20  public:
    1.21      virtual ~SDL_winrtrenderer();
    1.22 -	virtual void Initialize(Windows::UI::Core::CoreWindow^ window);
    1.23 -	virtual void HandleDeviceLost();
    1.24 -	virtual void CreateDeviceResources();
    1.25 -	virtual void CreateWindowSizeDependentResources();
    1.26 -	virtual void UpdateForWindowSizeChange();
    1.27 -	virtual void Present();
    1.28 -	virtual float ConvertDipsToPixels(float dips);
    1.29 +    virtual void Initialize(Windows::UI::Core::CoreWindow^ window);
    1.30 +    virtual void HandleDeviceLost();
    1.31 +    virtual void CreateDeviceResources();
    1.32 +    virtual void CreateWindowSizeDependentResources();
    1.33 +    virtual void UpdateForWindowSizeChange();
    1.34 +    virtual void Present();
    1.35 +    virtual float ConvertDipsToPixels(float dips);
    1.36  
    1.37  internal:
    1.38 -	virtual void Render(SDL_Surface * surface, SDL_Rect * rects, int numrects);
    1.39 +    virtual void Render(SDL_Surface * surface, SDL_Rect * rects, int numrects);
    1.40      void ResizeMainTexture(int w, int h);
    1.41  
    1.42  protected private:
    1.43 -	// Direct3D Objects.
    1.44 -	Microsoft::WRL::ComPtr<ID3D11Device1> m_d3dDevice;
    1.45 -	Microsoft::WRL::ComPtr<ID3D11DeviceContext1> m_d3dContext;
    1.46 -	Microsoft::WRL::ComPtr<IDXGISwapChain1> m_swapChain;
    1.47 -	Microsoft::WRL::ComPtr<ID3D11RenderTargetView> m_renderTargetView;
    1.48 -	Microsoft::WRL::ComPtr<ID3D11InputLayout> m_inputLayout;
    1.49 -	Microsoft::WRL::ComPtr<ID3D11Buffer> m_vertexBuffer;
    1.50 -	Microsoft::WRL::ComPtr<ID3D11VertexShader> m_vertexShader;
    1.51 -	Microsoft::WRL::ComPtr<ID3D11PixelShader> m_pixelShader;
    1.52 -	Microsoft::WRL::ComPtr<ID3D11Texture2D> m_mainTexture;
    1.53 -	Microsoft::WRL::ComPtr<ID3D11ShaderResourceView> m_mainTextureResourceView;
    1.54 -	Microsoft::WRL::ComPtr<ID3D11SamplerState> m_mainSampler;
    1.55 +    // Direct3D Objects.
    1.56 +    Microsoft::WRL::ComPtr<ID3D11Device1> m_d3dDevice;
    1.57 +    Microsoft::WRL::ComPtr<ID3D11DeviceContext1> m_d3dContext;
    1.58 +    Microsoft::WRL::ComPtr<IDXGISwapChain1> m_swapChain;
    1.59 +    Microsoft::WRL::ComPtr<ID3D11RenderTargetView> m_renderTargetView;
    1.60 +    Microsoft::WRL::ComPtr<ID3D11InputLayout> m_inputLayout;
    1.61 +    Microsoft::WRL::ComPtr<ID3D11Buffer> m_vertexBuffer;
    1.62 +    Microsoft::WRL::ComPtr<ID3D11VertexShader> m_vertexShader;
    1.63 +    Microsoft::WRL::ComPtr<ID3D11PixelShader> m_pixelShader;
    1.64 +    Microsoft::WRL::ComPtr<ID3D11Texture2D> m_mainTexture;
    1.65 +    Microsoft::WRL::ComPtr<ID3D11ShaderResourceView> m_mainTextureResourceView;
    1.66 +    Microsoft::WRL::ComPtr<ID3D11SamplerState> m_mainSampler;
    1.67  
    1.68      // UpdateWindowSurface helper objects
    1.69      SDL_Surface * m_mainTextureHelperSurface;
    1.70  
    1.71 -	// Cached renderer properties.
    1.72 -	D3D_FEATURE_LEVEL m_featureLevel;
    1.73 -	Windows::Foundation::Size m_renderTargetSize;
    1.74 -	Windows::Foundation::Rect m_windowBounds;
    1.75 -	Platform::Agile<Windows::UI::Core::CoreWindow> m_window;
    1.76 -	Windows::Graphics::Display::DisplayOrientations m_orientation;
    1.77 -	uint32 m_vertexCount;
    1.78 +    // Cached renderer properties.
    1.79 +    D3D_FEATURE_LEVEL m_featureLevel;
    1.80 +    Windows::Foundation::Size m_renderTargetSize;
    1.81 +    Windows::Foundation::Rect m_windowBounds;
    1.82 +    Platform::Agile<Windows::UI::Core::CoreWindow> m_window;
    1.83 +    Windows::Graphics::Display::DisplayOrientations m_orientation;
    1.84 +    uint32 m_vertexCount;
    1.85  
    1.86 -	// Transform used for display orientation.
    1.87 -	DirectX::XMFLOAT4X4 m_orientationTransform3D;
    1.88 +    // Transform used for display orientation.
    1.89 +    DirectX::XMFLOAT4X4 m_orientationTransform3D;
    1.90  
    1.91      // Has the renderer finished loading?
    1.92      bool m_loadingComplete;