The Vish Visualization Shell 0.3
Vish
Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Wizt::LayeredMultiViews Struct Reference

Handling multiple views in multiple layers in multiple viewports. More...

#include <ocean/Anemonia/LayeredMultiViews.hpp>

Inheritance diagram for Wizt::LayeredMultiViews:
Wizt::VRenderContextBasin Wizt::VRenderContext Wizt::VGLRenderContext Wizt::WebGLRenderContext

Classes

struct  Layers
 

Public Types

using LayeredViews_t = std::vector< ProjectionLayerViews_t >
 Data structure for the internal LayeredViews member, which is indexed by:
 

Public Member Functions

ViewCurrentView (unsigned Eye, unsigned int ViewportIndex=0)
 Access the view of the current eye for the current projection layer such that it can be modified.
 
const ViewCurrentView (unsigned Eye, unsigned int ViewportIndex=0) const
 Access the view of the current eye for the current projection layer.
 
const ViewgetWorldView (unsigned Eye, unsigned int ViewportIndex=0) const
 Access to the world view parameters, which are valid after the camera objects have been rendered.
 
bool isValid (const Anemone &) const
 Check whether the Anemone is non-empty and the number of views in the Anemone matches the current settings.
 
glsl MultiViewPrefix (bool Define_num_views_layout=true, std::size_t MultiViewBindingPoint=0) const
 Define in GSL.
 
void setNumberOfEyes (unsigned NumberOfEyes)
 Change the number of views that are available for rendering.
 

Public Attributes

int CurrentEye = 0
 Stereo support: 0 ... cyclops, no stereo +1 ... right eye Any other numbers may be used to indicate eyes that are shifted even wider.
 
int MultiViewOutput = 1
 Requested views that are available for output at once.
 

Static Public Attributes

static constinit char DefineStructView []
 
static constexpr unsigned MaxViewports = 16
 Maximally allowed number of viewports.
 

Detailed Description

Handling multiple views in multiple layers in multiple viewports.

Member Typedef Documentation

◆ LayeredViews_t

using Wizt::LayeredMultiViews::LayeredViews_t = std::vector<ProjectionLayerViews_t>

Data structure for the internal LayeredViews member, which is indexed by:

View&theView = LayeredViews[ ProjectionLayer ][ ViewportIndex ][ EyeNumber ];
Defining the view in a rendering scene via the projection parameters and the rotation / translation d...
Definition View.hpp:155

whereby the outermost index range is dynamic and determined at runtime, i.e. the number of eyes determined at runtime depending on whether the output is stereo or some multi-display environment.

Member Function Documentation

◆ getWorldView()

const View & Wizt::LayeredMultiViews::getWorldView ( unsigned  Eye,
unsigned int  ViewportIndex = 0 
) const

Access to the world view parameters, which are valid after the camera objects have been rendered.

This call allows, for instance, overlay objects to access the world view parameters.

References MaxViewports.

◆ MultiViewPrefix()

glsl Wizt::LayeredMultiViews::MultiViewPrefix ( bool  Define_num_views_layout = true,
std::size_t  MultiViewBindingPoint = 0 
) const
inline

Define in GSL.

  • the struct View as in DefineStructView
  • the num_views layout for multiview
  • multiview_transform* functions

◆ setNumberOfEyes()

void Wizt::LayeredMultiViews::setNumberOfEyes ( unsigned  NumberOfEyes)

Change the number of views that are available for rendering.

Some Lens object may specify that we want to render multiple views even on a single output device.

The VRenderContext::NumberOfOutputChannels is the number of screens available in hardware for rendering.

Member Data Documentation

◆ DefineStructView

constinit char Wizt::LayeredMultiViews::DefineStructView
static
       Define the View structure in GLSL that defines
       the modelview and projection matrices plus the
       camera parameters.
       @code

// Camera properties with padding as needed for uniform blocks struct CameraProperties { vec4 Observer, LookAt, Up; float ViewAngle, Unused1, Unused2, Unused3; };

// The view structure describing the camera and projections derived thereform struct View { mat4 ProjectionMatrix, UntranslatedModelViewMatrix, FullModelViewMatrix;

vec4 Translation, Unused;

CameraProperties CameraSettings; };

◆ MaxViewports

constexpr unsigned Wizt::LayeredMultiViews::MaxViewports = 16
staticconstexpr

Maximally allowed number of viewports.

This limit is imposed by OpenGL.

Referenced by CurrentView(), CurrentView(), and getWorldView().

◆ MultiViewOutput

int Wizt::LayeredMultiViews::MultiViewOutput = 1

Requested views that are available for output at once.

This would be identical to the number of eyes during a multiview rendering an one for a single view rendering with multiple passes.

Referenced by Wizt::VGLRenderContext::render().