|
Ocular Engine
|
Public Member Functions | |
| virtual bool | initialize () override |
| virtual void | clearBuffers (Core::Color const &clearColor=Core::Color::DefaultClearGray()) override |
| virtual void | clearDepthBuffer (float value=1.0f) override |
| virtual void | clearStencilBuffer (uint32_t value=0) override |
| virtual void | swapBuffers () override |
| virtual void | setRenderTexture (RenderTexture *texture) override |
| virtual void | setDepthTexture (DepthTexture *texture) override |
| virtual Material * | createMaterial () const override |
| virtual Viewport * | createViewport (float x, float y, float width, float height, float minDepth=0.0f, float maxDepth=1.0f) const override |
| virtual Texture * | createTexture (TextureDescriptor const &descriptor) const override |
| virtual Texture2D * | createTexture2D (TextureDescriptor const &descriptor) const override |
| virtual RenderTexture * | createRenderTexture (TextureDescriptor const &descriptor) const override |
| virtual DepthTexture * | createDepthTexture (TextureDescriptor const &descriptor) const override |
| virtual uint32_t | getMaxBoundTextures () const override |
| virtual VertexShader * | createVertexShader () const override |
| virtual GeometryShader * | createGeometryShader () const override |
| virtual FragmentShader * | createFragmentShader () const override |
| virtual PreTessellationShader * | createPreTessellationShader () const override |
| virtual PostTessellationShader * | createPostTessellationShader () const override |
| virtual UniformBuffer * | createUniformBuffer (UniformBufferType type) const override |
| virtual IndexBuffer * | createIndexBuffer () const override |
| virtual VertexBuffer * | createVertexBuffer () const override |
| virtual GPUBuffer * | createGPUBuffer (GPUBufferDescriptor const &descriptor) const override |
| virtual bool | renderMesh (Mesh *mesh, uint32_t submesh=0) override |
| virtual bool | renderBounds (Core::SceneObject *object, Math::BoundsType type) override |
| OD3D11Device * | getD3DDevice () const |
| OD3D11DeviceContext * | getD3DDeviceContext () const |
| OD3DSwapChain * | getD3DSwapChain () const |
Public Member Functions inherited from Ocular::Graphics::GraphicsDriver | |
| virtual RenderState * | getRenderState () |
| virtual void | drawDebugLine (Math::Vector3f const &start, Math::Vector3f const &stop, Core::Color const &color, uint64_t lifetime=30000) |
| virtual void | drawDebugCircle (Math::Vector3f const ¢er, float radius, Math::Vector3f const &normal, Core::Color const &color, uint32_t segments=64, uint64_t lifetime=30000) |
| virtual void | renderDebug () |
| void | clearFrameStats () |
| FrameStats | getLastFrameStats () const |
Static Public Member Functions | |
| static bool | ConvertTextureDescriptor (TextureDescriptor const &source, D3D11_TEXTURE2D_DESC &dest) |
| static bool | ConvertTextureDescriptor (D3D11_TEXTURE2D_DESC const &source, TextureDescriptor &dest) |
Protected Member Functions | |
| virtual bool | onEvent (std::shared_ptr< Core::AEvent > event) override |
| void | resizeSwapChain (uint32_t width, uint32_t height) |
| bool | validateWindow (std::shared_ptr< Core::AWindow > window, HWND &hwnd) const |
| bool | createDeviceAndSwapChain (Core::WindowWin32 const *window, HWND const hwnd) |
| DXGI_SWAP_CHAIN_DESC | createSwapChainDescription (Core::WindowWin32 const *window) const |
| bool | fetchDeviceAndSwapChain1 (ID3D11Device *device, ID3D11DeviceContext *context, Core::WindowWin32 const *window) |
| bool | fetchDeviceAndSwapChain2 (ID3D11Device *device, ID3D11DeviceContext *context, Core::WindowWin32 const *window) |
| void | printD3DDebug () |
Protected Member Functions inherited from Ocular::Graphics::GraphicsDriver | |
| void | addDrawCall (uint32_t numIndices) |
Protected Member Functions inherited from Ocular::Core::AEventListener | |
| virtual bool | onEvent (std::shared_ptr< AEvent > event)=0 |
Static Protected Member Functions | |
| static bool | ValidateTextureDescriptor (TextureDescriptor const &descriptor) |
Additional Inherited Members | |
Protected Attributes inherited from Ocular::Graphics::GraphicsDriver | |
| FrameStats | m_LastFrameStats |
| FrameStats | m_CurrFrameStats |
| Debug | m_Debug |
| RenderState * | m_RenderState |
|
overridevirtual |
Clears the backbuffer RTV, and currently bound depth/stencil buffers.
The backbuffer is cleared to the specified color value. The depth buffer is cleared to 1.0. The stencil buffer is cleared to 0.
| [in] | clearColor |
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Clears the active depth buffer to the specified value.
| [in] | value |
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Clears the active stencil buffer to the specified value.
| [in] | value |
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Creates a new API-specific implementation of the DepthTexture class.
| [in] | descriptor |
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Creates a new API-specific implementation of the FragmentShader class.
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Creates a new API-specific implementation of the GeometryShader class.
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Creates a new API-specific GPU Buffer. The type of underlying buffer depends on the parameters specified in the descriptor.
| [in] | descriptor |
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Creates a new API-specific implementation of the IndexBuffer class.
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Creates a new API-specific implementation of the Material class.
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Creates a new API-specific implementation of the PostTessellationShader class.
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Creates a new API-specific implementation of the PreTessellationShader class.
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Creates a new API-specific implementation of the RenderTexture class.
| [in] | descriptor |
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Creates a new API-specific implementation of the Texture class.
| [in] | descriptor |
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Creates a new API-specific implementation of the Texture2D class.
| [in] | descriptor |
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Creates a new API-specific implementation of the UniformBuffer class.
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Creates a new API-specific implementation of the VertexBuffer class.
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Creates a new API-specific implementation of the VertexShader class.
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Returns the maximum number of textures that can be bound to a single shader. This is primarily for use when assigning textures to materials, but can be used in other locations as well.
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Initializes the GraphicsDriver implementation.
Initialization follows the steps below:
1. Verify the window 2. Create the device, device context, and swap chain 3. Set the default render states
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Renders the bounds of the specified SceneObject
| [in] | object | |
| [in] | type |
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Renders the specified mesh and it's vertex and index buffers.
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Sets the Depth Texture to direct all depth operations towards.
| [in] | texture |
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Sets the Render Texture to direct all rendering operations towards.
| [in] | texture |
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
overridevirtual |
Swaps the back and front buffers.
Reimplemented from Ocular::Graphics::GraphicsDriver.
|
staticprotected |
For the following restrictions, see the D3D11_USAGE flag values at:
https://msdn.microsoft.com/en-us/library/windows/desktop/ff476259(v=vs.85).aspx
Note: currently does not support STAGING
| Usage Flags | CPU Read | CPU Write | GPU Read | GPU Write |
|---|---|---|---|---|
| DEFAULT | Y | Y | ||
| DYNAMIC | Y | Y | ||
| IMMUTABLE | Y | |||
| STAGING | Y | Y | Y | Y |