|
virtual bool | initialize () |
|
virtual void | clearBuffers (Core::Color const &clearColor=Core::Color::DefaultClearGray()) |
|
virtual void | clearDepthBuffer (float value=1.0f) |
|
virtual void | clearStencilBuffer (uint32_t value=0) |
|
virtual void | swapBuffers () |
|
virtual RenderState * | getRenderState () |
|
virtual void | setRenderTexture (RenderTexture *texture) |
|
virtual void | setDepthTexture (DepthTexture *texture) |
|
virtual Material * | createMaterial () const |
|
virtual Viewport * | createViewport (float x, float y, float width, float height, float minDepth=0.0f, float maxDepth=1.0f) const |
|
virtual Texture * | createTexture (TextureDescriptor const &descriptor) const |
|
virtual Texture2D * | createTexture2D (TextureDescriptor const &descriptor) const |
|
virtual RenderTexture * | createRenderTexture (TextureDescriptor const &descriptor) const |
|
virtual DepthTexture * | createDepthTexture (TextureDescriptor const &descriptor) const |
|
virtual uint32_t | getMaxBoundTextures () const |
|
virtual VertexShader * | createVertexShader () const |
|
virtual GeometryShader * | createGeometryShader () const |
|
virtual FragmentShader * | createFragmentShader () const |
|
virtual PreTessellationShader * | createPreTessellationShader () const |
|
virtual PostTessellationShader * | createPostTessellationShader () const |
|
virtual UniformBuffer * | createUniformBuffer (UniformBufferType type) const |
|
virtual IndexBuffer * | createIndexBuffer () const |
|
virtual VertexBuffer * | createVertexBuffer () const |
|
virtual GPUBuffer * | createGPUBuffer (GPUBufferDescriptor const &descriptor) const |
|
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 () |
|
virtual bool | renderMesh (Mesh *mesh, uint32_t submesh=0) |
|
virtual bool | renderBounds (Core::SceneObject *object, Math::BoundsType type) |
|
void | clearFrameStats () |
|
FrameStats | getLastFrameStats () const |
|
void Ocular::Graphics::GraphicsDriver::addDrawCall |
( |
uint32_t |
numIndices | ) |
|
|
protected |
Updates the current frame stats with a new draw call.
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.
- Parameters
-
Reimplemented in Ocular::Graphics::D3D11GraphicsDriver.
void Ocular::Graphics::GraphicsDriver::clearDepthBuffer |
( |
float |
value = 1.0f | ) |
|
|
virtual |
void Ocular::Graphics::GraphicsDriver::clearFrameStats |
( |
| ) |
|
Called at the beginning of a new frame to clear the frame statistics.
void Ocular::Graphics::GraphicsDriver::clearStencilBuffer |
( |
uint32_t |
value = 0 | ) |
|
|
virtual |
Creates a new API-specific implementation of the DepthTexture class.
- Parameters
-
- Returns
- Returns the new instantiated texture. The caller must assume ownership of the texture and handle any cleanup. May return NULL if texture creation failed.
Reimplemented in Ocular::Graphics::D3D11GraphicsDriver.
FragmentShader * Ocular::Graphics::GraphicsDriver::createFragmentShader |
( |
| ) |
const |
|
virtual |
Creates a new API-specific implementation of the FragmentShader class.
- Returns
- Returns the new instantiated shader. The caller must assume ownership of the shader and handle any cleanup. May return NULL if shader creation failed.
Reimplemented in Ocular::Graphics::D3D11GraphicsDriver.
GeometryShader * Ocular::Graphics::GraphicsDriver::createGeometryShader |
( |
| ) |
const |
|
virtual |
Creates a new API-specific implementation of the GeometryShader class.
- Returns
- Returns the new instantiated shader. The caller must assume ownership of the shader and handle any cleanup. May return NULL if shader creation failed.
Reimplemented in Ocular::Graphics::D3D11GraphicsDriver.
Creates a new API-specific GPU Buffer. The type of underlying buffer depends on the parameters specified in the descriptor.
- Parameters
-
- Returns
- Returns the new GPU Buffer. If the provided descriptor does not describe a valid buffer, then NULL is returned.
Reimplemented in Ocular::Graphics::D3D11GraphicsDriver.
IndexBuffer * Ocular::Graphics::GraphicsDriver::createIndexBuffer |
( |
| ) |
const |
|
virtual |
Creates a new API-specific implementation of the IndexBuffer class.
- Returns
- Returns the new instantiated buffer. The caller must assume ownership of the buffer and handle any cleanup. May return NULL if buffer creation failed.
Reimplemented in Ocular::Graphics::D3D11GraphicsDriver.
Material * Ocular::Graphics::GraphicsDriver::createMaterial |
( |
| ) |
const |
|
virtual |
Creates a new API-specific implementation of the Material class.
- Returns
- Returns the new instantiated material. The caller must assume ownership of the texture and handle any cleanup. May return NULL if texture creation failed.
Reimplemented in Ocular::Graphics::D3D11GraphicsDriver.
Creates a new API-specific implementation of the PreTessellationShader class.
- Returns
- Returns the new instantiated shader. The caller must assume ownership of the shader and handle any cleanup. May return NULL if shader creation failed.
Reimplemented in Ocular::Graphics::D3D11GraphicsDriver.
Creates a new API-specific implementation of the RenderTexture class.
- Parameters
-
- Returns
- Returns the new instantiated texture. The caller must assume ownership of the texture and handle any cleanup. May return NULL if texture creation failed.
Reimplemented in Ocular::Graphics::D3D11GraphicsDriver.
Creates a new API-specific implementation of the Texture class.
- Parameters
-
- Returns
- Returns the new instantiated texture. The caller must assume ownership of the texture and handle any cleanup. May return NULL if texture creation failed.
Reimplemented in Ocular::Graphics::D3D11GraphicsDriver.
Creates a new API-specific implementation of the Texture2D class.
- Parameters
-
- Returns
- Returns the new instantiated texture. The caller must assume ownership of the texture and handle any cleanup. May return NULL if texture creation failed.
Reimplemented in Ocular::Graphics::D3D11GraphicsDriver.
UniformBuffer * Ocular::Graphics::GraphicsDriver::createUniformBuffer |
( |
UniformBufferType |
type | ) |
const |
|
virtual |
Creates a new API-specific implementation of the UniformBuffer class.
- Returns
- Returns the new instantiated buffer. The caller must assume ownership of the buffer and handle any cleanup. May return NULL if buffer creation failed.
Reimplemented in Ocular::Graphics::D3D11GraphicsDriver.
VertexBuffer * Ocular::Graphics::GraphicsDriver::createVertexBuffer |
( |
| ) |
const |
|
virtual |
Creates a new API-specific implementation of the VertexBuffer class.
- Returns
- Returns the new instantiated buffer. The caller must assume ownership of the buffer and handle any cleanup. May return NULL if buffer creation failed.
Reimplemented in Ocular::Graphics::D3D11GraphicsDriver.
VertexShader * Ocular::Graphics::GraphicsDriver::createVertexShader |
( |
| ) |
const |
|
virtual |
Creates a new API-specific implementation of the VertexShader class.
- Returns
- Returns the new instantiated shader. The caller must assume ownership of the shader and handle any cleanup. May return NULL if shader creation failed.
Reimplemented in Ocular::Graphics::D3D11GraphicsDriver.
void Ocular::Graphics::GraphicsDriver::drawDebugCircle |
( |
Math::Vector3f const & |
center, |
|
|
float |
radius, |
|
|
Math::Vector3f const & |
normal, |
|
|
Core::Color const & |
color, |
|
|
uint32_t |
segments = 64 , |
|
|
uint64_t |
lifetime = 30000 |
|
) |
| |
|
virtual |
Draws a 3D circle on all viewports that lasts for the specified length of time.
- Parameters
-
[in] | center | Center of the circle in world coordinates. |
[in] | radius | Radius of the circle in units. |
[in] | normal | Normal of the circle's surface. |
[in] | color | Color of the circle. |
[in] | segments | Number of individual segments that comprise the circle. Minimum of 3. |
[in] | lifetime | Length of time (in milliseconds) the line should be drawn. Lifetime of 0 indicates the line will persist forever. |
Draws a line on all viewports that lasts for the specified length of time.
- Parameters
-
[in] | start | Line starting point in world coordinates |
[in] | stop | Line stopping point in world coordinates |
[in] | color | Line color |
[in] | lifetime | Length of time (in milliseconds) the line should be drawn. Lifetime of 0 indicates the line will persist forever. |
FrameStats Ocular::Graphics::GraphicsDriver::getLastFrameStats |
( |
| ) |
const |
Returns the statistics from the last rendered frame.
uint32_t Ocular::Graphics::GraphicsDriver::getMaxBoundTextures |
( |
| ) |
const |
|
virtual |
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 in Ocular::Graphics::D3D11GraphicsDriver.
RenderState * Ocular::Graphics::GraphicsDriver::getRenderState |
( |
| ) |
|
|
virtual |
bool Ocular::Graphics::GraphicsDriver::initialize |
( |
| ) |
|
|
virtual |
bool Ocular::Graphics::GraphicsDriver::renderBounds |
( |
Core::SceneObject * |
object, |
|
|
Math::BoundsType |
type |
|
) |
| |
|
virtual |
void Ocular::Graphics::GraphicsDriver::renderDebug |
( |
| ) |
|
|
virtual |
Renders all debug shapes.
bool Ocular::Graphics::GraphicsDriver::renderMesh |
( |
Mesh * |
mesh, |
|
|
uint32_t |
submesh = 0 |
|
) |
| |
|
virtual |
void Ocular::Graphics::GraphicsDriver::setDepthTexture |
( |
DepthTexture * |
texture | ) |
|
|
virtual |
void Ocular::Graphics::GraphicsDriver::setRenderTexture |
( |
RenderTexture * |
texture | ) |
|
|
virtual |
void Ocular::Graphics::GraphicsDriver::swapBuffers |
( |
| ) |
|
|
virtual |
The documentation for this class was generated from the following files:
- C:/Projects/OcularEngine/OcularCore/include/Graphics/GraphicsDriver.hpp
- C:/Projects/OcularEngine/OcularCore/src/Graphics/GraphicsDriver.cpp