Axmol 3.0.0-89d6d9a
Loading...
Searching...
No Matches
ContextAttrs Struct Reference

Engine context attributes for rendering, window, and driver setup. More...

#include <Types.h>

Public Attributes

int redBits {8}
 Red channel precision in bits.
int greenBits {8}
 Green channel precision in bits.
int blueBits {8}
 Blue channel precision in bits.
int alphaBits {8}
 Alpha channel precision in bits.
int depthBits {24}
 Depth buffer precision in bits.
int stencilBits {8}
 Stencil buffer precision in bits.
int multisamplingCount {0}
 Number of samples for MSAA (0 = disabled).
bool vsync {true}
 Enable vertical sync.
bool debugLayerEnabled {false}
 Enable graphics API debug layer.
uint32_t uploadBufferSize {16 * 1024 * 1024}
 Upload buffer size (used by D3D12 RHI).
bool visible {true}
 Whether the window is visible at creation.
bool decorated {true}
 Whether the window has system decorations.
void * windowParent {nullptr}
 Parent window handle (Win32-specific).
PowerPreference powerPreference {PowerPreference::Auto}
 GPU power preference.
RenderScaleMode renderScaleMode {RenderScaleMode::Default}
 Render scaling mode.

Detailed Description

Engine context attributes for rendering, window, and driver setup.

This structure defines the configuration parameters used when creating the rendering context and window surface. Attributes are grouped into:

  • Rendering attributes: color/depth/stencil precision, MSAA, vsync, debug layers, upload buffer size, shader-controlled sampler.
  • Window attributes: visibility, decorations, parent window handle.
  • Driver attributes: GPU power preference, render scale mode.

Default values are chosen to provide a balance between compatibility and quality across platforms.


The documentation for this struct was generated from the following file:
  • Types.h