mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-28 16:49:43 +00:00
Side by side rendering
- Side by side rendering implemented throughout the graphics pipeline. - New GuiTSCtrl renderStyle property is set to "stereo side by side" to activate. - You set an IDisplayDevice on the GameConnection to define any vertical FOV, projection offset, and stereo eye offset properties required for the stereo rendering (no display device included with this commit). - Full and Empty templates updated with correct scripts and shaders.
This commit is contained in:
parent
b1feed56fd
commit
b32e7688c2
28 changed files with 465 additions and 41 deletions
|
|
@ -36,6 +36,8 @@ struct CameraQuery
|
|||
F32 nearPlane;
|
||||
F32 farPlane;
|
||||
F32 fov;
|
||||
Point2F projectionOffset;
|
||||
Point3F eyeOffset;
|
||||
bool ortho;
|
||||
MatrixF cameraMatrix;
|
||||
};
|
||||
|
|
@ -45,12 +47,17 @@ class GuiTSCtrl : public GuiContainer
|
|||
{
|
||||
typedef GuiContainer Parent;
|
||||
|
||||
public:
|
||||
enum RenderStyles {
|
||||
RenderStyleStandard = 0,
|
||||
RenderStyleStereoSideBySide = (1<<0),
|
||||
};
|
||||
|
||||
protected:
|
||||
static U32 smFrameCount;
|
||||
F32 mCameraZRot;
|
||||
F32 mForceFOV;
|
||||
|
||||
protected:
|
||||
|
||||
/// A list of GuiTSCtrl which are awake and
|
||||
/// most likely rendering.
|
||||
static Vector<GuiTSCtrl*> smAwakeTSCtrls;
|
||||
|
|
@ -59,8 +66,11 @@ protected:
|
|||
/// update timeslice for this viewport to get.
|
||||
F32 mReflectPriority;
|
||||
|
||||
F32 mOrthoWidth;
|
||||
F32 mOrthoHeight;
|
||||
/// The current render type
|
||||
U32 mRenderStyle;
|
||||
|
||||
F32 mOrthoWidth;
|
||||
F32 mOrthoHeight;
|
||||
|
||||
MatrixF mSaveModelview;
|
||||
MatrixF mSaveProjection;
|
||||
|
|
@ -150,4 +160,8 @@ public:
|
|||
DECLARE_DESCRIPTION( "Abstract base class for controls that render a 3D viewport." );
|
||||
};
|
||||
|
||||
typedef GuiTSCtrl::RenderStyles GuiTSRenderStyles;
|
||||
|
||||
DefineEnumType( GuiTSRenderStyles );
|
||||
|
||||
#endif // _GUITSCONTROL_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue