mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 12:25:30 +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
|
|
@ -219,6 +219,7 @@ GameConnection::GameConnection()
|
|||
// first person
|
||||
mFirstPerson = true;
|
||||
mUpdateFirstPerson = false;
|
||||
clearDisplayDevice();
|
||||
}
|
||||
|
||||
GameConnection::~GameConnection()
|
||||
|
|
@ -1729,6 +1730,13 @@ DefineEngineMethod( GameConnection, setControlObject, bool, (GameBase* ctrlObj),
|
|||
return true;
|
||||
}
|
||||
|
||||
DefineEngineMethod( GameConnection, clearDisplayDevice, void, (),,
|
||||
"@brief Clear any display device.\n\n"
|
||||
"A display device may define a number of properties that are used during rendering.\n\n")
|
||||
{
|
||||
object->clearDisplayDevice();
|
||||
}
|
||||
|
||||
DefineEngineMethod( GameConnection, getControlObject, GameBase*, (),,
|
||||
"@brief On the server, returns the object that the client is controlling."
|
||||
"By default the control object is an instance of the Player class, but can also be an instance "
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ enum GameConnectionConstants
|
|||
DataBlockQueueCount = 16
|
||||
};
|
||||
|
||||
class IDisplayDevice;
|
||||
class SFXProfile;
|
||||
class MatrixF;
|
||||
class MatrixF;
|
||||
|
|
@ -86,6 +87,8 @@ private:
|
|||
F32 mCameraFov; ///< Current camera fov (in degrees).
|
||||
F32 mCameraPos; ///< Current camera pos (0-1).
|
||||
F32 mCameraSpeed; ///< Camera in/out speed.
|
||||
|
||||
IDisplayDevice* mDisplayDevice; ///< Optional client display device that imposes rendering properties.
|
||||
/// @}
|
||||
|
||||
public:
|
||||
|
|
@ -263,6 +266,10 @@ public:
|
|||
|
||||
void setFirstPerson(bool firstPerson);
|
||||
|
||||
bool hasDisplayDevice() const { return mDisplayDevice != NULL; }
|
||||
const IDisplayDevice* getDisplayDevice() const { return mDisplayDevice; }
|
||||
void setDisplayDevice(IDisplayDevice* display) { mDisplayDevice = display; }
|
||||
void clearDisplayDevice() { mDisplayDevice = NULL; }
|
||||
/// @}
|
||||
|
||||
void detectLag();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue