Cogs.Rendering
Loading...
Searching...
No Matches
Public Attributes | List of all members
Cogs::GraphicsDeviceSettings Struct Reference

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.
 
IIOHandlerioHandler
 Optional pointer to an IO handler.
 

Detailed Description

Settings for graphics device initialization.

Member Data Documentation

◆ colorFormat

TextureFormat Cogs::GraphicsDeviceSettings::colorFormat = TextureFormat::R8G8B8A8_UNORM_SRGB

Back buffer format.

◆ depthFormat

TextureFormat Cogs::GraphicsDeviceSettings::depthFormat = TextureFormat::D32_FLOAT

Depth buffer format.

◆ featureLevelMajor

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.

◆ featureLevelMinor

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.

◆ flags

int Cogs::GraphicsDeviceSettings::flags = GraphicsDeviceFlags::None

Flags controlling the behavior of the graphics device.

See also
GraphicsDeviceFlags

◆ ioHandler

IIOHandler* Cogs::GraphicsDeviceSettings::ioHandler

Optional pointer to an IO handler.

◆ numSamples

int Cogs::GraphicsDeviceSettings::numSamples = 1

Number of samples to use for back buffer MSAA.

◆ sharedSurface

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;

  • initialize
  • setSize If, after calling one of these methods, the shared surface has changed, the calling code must update its references to the shared surface.

◆ windowData

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.


The documentation for this struct was generated from the following file: