Cogs.Core
|
Settings for graphics device initialization. More...
#include <IGraphicsDevice.h>
Public Attributes | |
int | featureLevelMajor |
Major feature level. | |
int | featureLevelMinor |
Minor feature level. | |
TextureFormat | colorFormat = TextureFormat::R8G8B8A8_UNORM_SRGB |
Back buffer format. | |
TextureFormat | depthFormat = TextureFormat::D32_FLOAT |
Depth buffer format. | |
int | numSamples = 1 |
Number of samples to use for back buffer MSAA. | |
int | flags = GraphicsDeviceFlags::None |
Flags controlling the behavior of the graphics device. | |
struct WindowData * | windowData |
Native window handle used to initialize the graphics device. | |
void ** | sharedSurface = nullptr |
Pointer to storage for a pointer to a shared surface. | |
IIOHandler * | ioHandler |
Optional pointer to an IO handler. | |
Settings for graphics device initialization.
Definition at line 88 of file IGraphicsDevice.h.
TextureFormat Cogs::GraphicsDeviceSettings::colorFormat = TextureFormat::R8G8B8A8_UNORM_SRGB |
Back buffer format.
Definition at line 116 of file IGraphicsDevice.h.
Referenced by Cogs::SwapChainGL20::recreateOffscreenBuffers().
TextureFormat Cogs::GraphicsDeviceSettings::depthFormat = TextureFormat::D32_FLOAT |
Depth buffer format.
Definition at line 121 of file IGraphicsDevice.h.
int Cogs::GraphicsDeviceSettings::featureLevelMajor |
Major feature level.
Corresponds to the underlying graphics APIs major version number desired. If the underlying API fails to meet the requirements, device initialization will fail.
Setting this to zero defaults the major version.
E.g if the user knows that some of the features desired require OpenGL version 3.2, this would be set to 3.
Definition at line 100 of file IGraphicsDevice.h.
int Cogs::GraphicsDeviceSettings::featureLevelMinor |
Minor feature level.
Corresponds to the underlying graphics APIs minor version number. If the underlying API fails to meet the requirements, device initialization will fail.
Setting this to zero defaults the minor version.
E.g if the user knows that some of the features desired require OpenGL version 3.2 this would be set to 2.
Definition at line 111 of file IGraphicsDevice.h.
int Cogs::GraphicsDeviceSettings::flags = GraphicsDeviceFlags::None |
Flags controlling the behavior of the graphics device.
Definition at line 133 of file IGraphicsDevice.h.
IIOHandler* Cogs::GraphicsDeviceSettings::ioHandler |
Optional pointer to an IO handler.
Definition at line 159 of file IGraphicsDevice.h.
Referenced by Cogs::GraphicsDeviceNull::initialize(), and Cogs::GraphicsDeviceWebGPU::initialize().
int Cogs::GraphicsDeviceSettings::numSamples = 1 |
Number of samples to use for back buffer MSAA.
Definition at line 126 of file IGraphicsDevice.h.
Referenced by Cogs::SwapChainGL20::initialize(), Cogs::SwapChainGL20::recreateOffscreenBuffers(), and Cogs::Core::Renderer::render().
void** Cogs::GraphicsDeviceSettings::sharedSurface = nullptr |
Pointer to storage for a pointer to a shared surface.
When shared surface support is enabled, a pointer to the shared back buffer surface will be stored at the given location whenever the shared surface is updated. The shares surface may be changed during the following operations;
Definition at line 156 of file IGraphicsDevice.h.
struct WindowData* Cogs::GraphicsDeviceSettings::windowData |
Native window handle used to initialize the graphics device.
On Windows systems this must be valid if the device should create and initialize an OpenGL context from scratch. If there is already an OpenGL context active the window handle can be left as default.
WindowData is a typedef for HWND on Windows, and a structure on Linux.
Definition at line 144 of file IGraphicsDevice.h.
Referenced by Cogs::GraphicsDeviceWebGPU::initialize().