Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Latest commit

 

History

History
54 lines (44 loc) · 1.6 KB

SDL_winrtrenderer.h

File metadata and controls

54 lines (44 loc) · 1.6 KB
 
Nov 26, 2012
Nov 26, 2012
3
4
#include "DirectXHelper.h"
#include "SDL.h"
Feb 3, 2013
Feb 3, 2013
5
#include "../../render/direct3d11/SDL_render_d3d11_cpp.h"
6
7
8
struct VertexPositionColor
{
Jan 9, 2013
Jan 9, 2013
9
10
DirectX::XMFLOAT3 pos;
DirectX::XMFLOAT2 tex;
Nov 26, 2012
Nov 26, 2012
13
14
// Helper class that initializes DirectX APIs for 3D rendering.
ref class SDL_winrtrenderer
Nov 26, 2012
Nov 26, 2012
16
internal:
Jan 9, 2013
Jan 9, 2013
17
SDL_winrtrenderer();
Nov 26, 2012
Nov 26, 2012
19
public:
Dec 10, 2012
Dec 10, 2012
20
virtual ~SDL_winrtrenderer();
Jan 9, 2013
Jan 9, 2013
21
22
23
24
25
26
27
virtual void Initialize(Windows::UI::Core::CoreWindow^ window);
virtual void HandleDeviceLost();
virtual void CreateDeviceResources();
virtual void CreateWindowSizeDependentResources();
virtual void UpdateForWindowSizeChange();
virtual void Present();
virtual float ConvertDipsToPixels(float dips);
Nov 22, 2012
Nov 22, 2012
28
29
internal:
Jan 9, 2013
Jan 9, 2013
30
virtual void Render(SDL_Surface * surface, SDL_Rect * rects, int numrects);
Nov 25, 2012
Nov 25, 2012
31
void ResizeMainTexture(int w, int h);
Feb 3, 2013
Feb 3, 2013
33
34
35
internal:
// Internal SDL rendeerer (likely a temporary addition, for refactoring purposes):
D3D11_RenderData * m_sdlRendererData;
Feb 3, 2013
Feb 3, 2013
37
protected private:
Dec 10, 2012
Dec 10, 2012
38
39
40
// UpdateWindowSurface helper objects
SDL_Surface * m_mainTextureHelperSurface;
Jan 9, 2013
Jan 9, 2013
41
42
43
44
45
46
47
// Cached renderer properties.
D3D_FEATURE_LEVEL m_featureLevel;
Windows::Foundation::Size m_renderTargetSize;
Windows::Foundation::Rect m_windowBounds;
Platform::Agile<Windows::UI::Core::CoreWindow> m_window;
Windows::Graphics::Display::DisplayOrientations m_orientation;
uint32 m_vertexCount;
Nov 26, 2012
Nov 26, 2012
48
Jan 9, 2013
Jan 9, 2013
49
50
// Transform used for display orientation.
DirectX::XMFLOAT4X4 m_orientationTransform3D;
Nov 26, 2012
Nov 26, 2012
51
52
53
// Has the renderer finished loading?
bool m_loadingComplete;