Plasma Engine  2.0
Loading...
Searching...
No Matches
plClipSpaceYMode Struct Reference

Specifies whether a projection matrix should flip the result along the Y axis or not. More...

#include <Declarations.h>

Public Types

enum  Enum { Regular , Flipped }
 

Static Public Attributes

static PL_FOUNDATION_DLL Enum RenderToTextureDefault = plClipSpaceYMode::Regular
 Holds the platform default value for the clip space Y mode when rendering to a texture. This can be overridden by renderers to ensure the proper mode is used when they become active. On Windows/D3D this is initialized with 'Regular' by default on all other platforms/OpenGL it is initialized with 'Flipped' by default.
 

Detailed Description

Specifies whether a projection matrix should flip the result along the Y axis or not.

Mostly needed to compensate for differing Y texture coordinate conventions. Ie. on some platforms the Y texture coordinate origin is at the lower left and on others on the upper left. To prevent having to modify content to compensate, instead textures are simply flipped along Y on texture load. The same has to be done for all render targets, ie. content has to be rendered upside-down.

Use plClipSpaceYMode::RenderToTextureDefault when rendering to a texture, to always get the correct projection matrix.

Member Enumeration Documentation

◆ Enum

Enumerator
Regular 

Creates a regular projection matrix.

Flipped 

Creates a projection matrix that flips the image on its head. On platforms with different Y texture coordinate conventions, this can be used to compensate, by rendering images flipped to render targets.


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