Cogs.Core
|
Graphics device construction factory. More...
#include <Factory.h>
Static Public Member Functions | |
static class IGraphicsDevice * | createDevice (RenderingAllocatorInfo *allocatorInfo=nullptr) |
Creates a graphics device. | |
static class IGraphicsDevice * | createDevice (const StringView &name) |
Creates a graphics device with the given type. | |
static class IGraphicsDevice * | createDevice (const GraphicsDeviceType &type, RenderingAllocatorInfo *allocatorInfo=nullptr) |
Creates a graphics device with the given type. | |
static void | releaseDevice (class IGraphicsDevice *device) |
Release the given graphics device, freeing all associated resources. | |
|
static |
Creates a graphics device with the given type.
type | Type of graphics device to create. |
allocatorInfo | Optional pointer to allocation information. |
Definition at line 103 of file Factory.cpp.
References Cogs::Memory::Allocator::defaultAllocator(), Cogs::Direct3D11, Cogs::Direct3D12, Cogs::Null, Cogs::OpenGL20, Cogs::OpenGLES30, Cogs::Unknown, Cogs::Vulkan, and Cogs::WebGPU.
|
static |
Creates a graphics device with the given type.
name | Name of the graphics device type. Valid names are (depending on the current build) OpenGL20, Direct3D11, OpenGLES30. |
Definition at line 67 of file Factory.cpp.
References Cogs::Direct3D11, Cogs::Direct3D12, Cogs::Null, Cogs::OpenGL20, Cogs::OpenGLES30, Cogs::Vulkan, and Cogs::WebGPU.
|
static |
Creates a graphics device.
The device type is determined from the built in supported types.
allocatorInfo | Optional pointer to allocation information. |
Definition at line 46 of file Factory.cpp.
References createDevice(), Cogs::Direct3D11, Cogs::Direct3D12, Cogs::Null, Cogs::OpenGL20, Cogs::OpenGLES30, Cogs::Vulkan, and Cogs::WebGPU.
Referenced by createDevice().
|
static |
Release the given graphics device, freeing all associated resources.
device | Pointer to a graphics device. |
Definition at line 147 of file Factory.cpp.
References Cogs::Direct3D11, Cogs::Direct3D12, Cogs::IGraphicsDevice::getType(), Cogs::Null, Cogs::OpenGL20, Cogs::OpenGLES30, Cogs::Vulkan, Cogs::WebGPU, and Cogs::IGraphicsDevice::~IGraphicsDevice().
Referenced by Cogs::Core::Context::~Context().