11 #include "DeviceResources.h" 12 #include "rendering/RenderSystem.h" 13 #include "threads/Condition.h" 14 #include "threads/CriticalSection.h" 15 #include "threads/SystemClock.h" 16 #include "utils/ColorUtils.h" 18 #include <wrl/client.h> 32 bool InitRenderSystem()
override;
33 bool DestroyRenderSystem()
override;
34 bool BeginRender()
override;
35 bool EndRender()
override;
36 void PresentRender(
bool rendered,
bool videoLayer)
override;
37 bool ClearBuffers(UTILS::COLOR::Color color)
override;
38 void SetViewPort(
const CRect& viewPort)
override;
39 void GetViewPort(
CRect& viewPort)
override;
40 void RestoreViewPort()
override;
41 CRect ClipRectToScissorRect(
const CRect &rect)
override;
42 bool ScissorsCanEffectClipping()
override;
43 void SetScissors(
const CRect &rect)
override;
44 void ResetScissors()
override;
45 void CaptureStateBlock()
override;
46 void ApplyStateBlock()
override;
47 void SetCameraPosition(
const CPoint &camera,
int screenWidth,
int screenHeight,
float stereoFactor = 0.f)
override;
48 void SetStereoMode(RENDER_STEREO_MODE mode, RENDER_STEREO_VIEW view)
override;
49 bool SupportsStereo(RENDER_STEREO_MODE mode)
const override;
50 void Project(
float &x,
float &y,
float &z)
override;
51 bool SupportsNPOT(
bool dxt)
const override;
54 void OnDXDeviceLost()
override;
55 void OnDXDeviceRestored()
override;
58 CGUIShaderDX* GetGUIShader()
const {
return m_pGUIShader; }
59 bool IsFormatSupport(DXGI_FORMAT format,
unsigned int usage)
const;
60 CRect GetBackBufferRect();
63 void FlushGPU()
const;
64 void RequestDecodingTime();
65 void ReleaseDecodingTime();
66 void SetAlphaBlendEnable(
bool enable);
69 bool IsExtSupported(
const char* extension)
const override {
return false; }
70 bool ResetRenderSystem(
int width,
int height)
override {
return true; }
73 virtual void PresentRenderImpl(
bool rendered) = 0;
78 void CheckInterlacedStereoView(
void);
79 void CheckDeviceCaps();
81 CCriticalSection m_resourceSection;
82 CCriticalSection m_decoderSection;
86 bool m_BlendEnabled{
false };
87 bool m_ScissorsEnabled{
false };
88 D3D11_VIEWPORT m_viewPort;
91 Microsoft::WRL::ComPtr<ID3D11DepthStencilState> m_depthStencilState;
92 Microsoft::WRL::ComPtr<ID3D11BlendState> m_BlendEnableState;
93 Microsoft::WRL::ComPtr<ID3D11BlendState> m_BlendDisableState;
94 Microsoft::WRL::ComPtr<ID3D11RasterizerState> m_RSScissorDisable;
95 Microsoft::WRL::ComPtr<ID3D11RasterizerState> m_RSScissorEnable;
102 std::shared_ptr<DX::DeviceResources> m_deviceResources;
Definition: D3DResource.h:90
bool m_inScene
True if we're in a BeginScene()/EndScene() block.
Definition: RenderSystemDX.h:85
Definition: SystemClock.h:31
Definition: RenderSystemDX.h:25
void Project(float &x, float &y, float &z) override
Project (x,y,z) 3d scene coordinates to (x,y) 2d screen coordinates.
Definition: RenderSystemDX.cpp:436
Definition: RenderSystem.h:27
Definition: GUIShaderDX.h:36
Definition: D3DResource.h:36
This is a thin wrapper around std::condition_variable_any.
Definition: Condition.h:26