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 Interlaced()
const {
return m_interlaced; }
60 bool IsFormatSupport(DXGI_FORMAT format,
unsigned int usage)
const;
61 CRect GetBackBufferRect();
64 void FlushGPU()
const;
65 void RequestDecodingTime();
66 void ReleaseDecodingTime();
67 void SetAlphaBlendEnable(
bool enable);
70 bool IsExtSupported(
const char* extension)
const override {
return false; }
71 bool ResetRenderSystem(
int width,
int height)
override {
return true; }
74 virtual void PresentRenderImpl(
bool rendered) = 0;
79 void CheckInterlacedStereoView(
void);
80 void CheckDeviceCaps();
82 CCriticalSection m_resourceSection;
83 CCriticalSection m_decoderSection;
88 bool m_BlendEnabled{
false };
89 bool m_ScissorsEnabled{
false };
90 D3D11_VIEWPORT m_viewPort;
93 Microsoft::WRL::ComPtr<ID3D11DepthStencilState> m_depthStencilState;
94 Microsoft::WRL::ComPtr<ID3D11BlendState> m_BlendEnableState;
95 Microsoft::WRL::ComPtr<ID3D11BlendState> m_BlendDisableState;
96 Microsoft::WRL::ComPtr<ID3D11RasterizerState> m_RSScissorDisable;
97 Microsoft::WRL::ComPtr<ID3D11RasterizerState> m_RSScissorEnable;
104 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:87
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:438
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