Easy3D 3.0.0
Loading...
Searching...
No Matches
WindowOptions Struct Reference

Window settings of a Viewer - the part both backends agree on. More...

#include <viewer.h>

Public Attributes

int width = 800
 Initial logical window width (positive).
 
int height = 600
 Initial logical window height (positive).
 
int samples = 1
 
bool full_screen = false
 Use the primary monitor's video mode instead of a windowed one.
 
bool visible = true
 
bool resizable = true
 Let the user resize the window.
 

Detailed Description

Window settings of a Viewer - the part both backends agree on.

Every field means the same thing on both backends. DeviceOptions is the separate backend-specific part of viewer construction. Build one by default-constructing it and assigning the fields that differ, as those two are used: default member initializers make a struct with them non-aggregate in C++11, so field-by-field assignment is the only portable way to set them.

Examples
Tutorial_202_Viewer_imgui.

Member Data Documentation

◆ samples

int samples = 1

Multisample count to request (Multisample counts). 1 (the default) and 0 both disable MSAA, while 2, 4, 8, 16, 32 or 64 enable it at that quality (if the device allows). A power of two the device cannot do steps down to the largest supported count with a warning, so a request such as 4 never makes the constructor throw; negative and other non-power-of-two counts are rejected. Ask samples() for the count actually obtained.

◆ visible

bool visible = true

Show the window at construction. When true, run() also shows it; run_frames() preserves the current visibility.


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