RigsofRods
Soft-body Physics Simulation
|
#include <GPUManager.h>
Public Types | |
enum | GpuProgram { GPUP_VERTEX = 0, GPUP_FRAGMENT = 1 } |
Gpu program enum. More... | |
Public Member Functions | |
GPUManager (SkyX *s) | |
Constructor. More... | |
~GPUManager () | |
Destructor. More... | |
void | addGroundPass (Ogre::Pass *GroundPass, const Ogre::Real &AtmosphereRadius, const Ogre::SceneBlendType &SBT=Ogre::SBT_ADD) |
Add ground pass (Use for atmospheric scattering effect on the terrain) More... | |
void | setGpuProgramParameter (const GpuProgram &GpuP, const Ogre::String &Name, const int &Value, const bool &UpdateGroundPasses=true) |
Set gpu program int parameter. More... | |
void | setGpuProgramParameter (const GpuProgram &GpuP, const Ogre::String &Name, const Ogre::Real &Value, const bool &UpdateGroundPasses=true) |
Set gpu program Ogre::Real parameter. More... | |
void | setGpuProgramParameter (const GpuProgram &GpuP, const Ogre::String &Name, const Ogre::Vector2 &Value, const bool &UpdateGroundPasses=true) |
Set gpu program Ogre::Vector2 parameter. More... | |
void | setGpuProgramParameter (const GpuProgram &GpuP, const Ogre::String &Name, const Ogre::Vector3 &Value, const bool &UpdateGroundPasses=true) |
Set gpu program Ogre::Vector3 parameter. More... | |
const Ogre::String | getSkydomeMaterialName () const |
Get skydome material name. More... | |
const Ogre::String | getMoonMaterialName () const |
Get moon material name. More... | |
void | _updateFP () |
Update fragment program materials. More... | |
void | _notifySkydomeMaterialChanged () |
Notify skydome material changed. More... | |
Private Member Functions | |
void | _setTextureHWGammaCorrection (const Ogre::String &n, const bool &g) |
Set texture HW gamma correction. More... | |
Private Attributes | |
Ogre::MaterialPtr | mSkydomeMaterial |
Skydome material. More... | |
std::vector< Ogre::Pass * > | mGroundPasses |
Ground pass vector. More... | |
SkyX * | mSkyX |
SkyX parent pointer. More... | |
Definition at line 33 of file GPUManager.h.
SkyX::GPUManager::GPUManager | ( | SkyX * | s | ) |
Constructor.
s | Parent SkyX pointer |
Definition at line 30 of file GPUManager.cpp.
SkyX::GPUManager::~GPUManager | ( | ) |
Destructor.
Definition at line 37 of file GPUManager.cpp.
|
inline |
Notify skydome material changed.
Definition at line 115 of file GPUManager.h.
|
private |
Set texture HW gamma correction.
n | Texture name |
g | True to enable gamma correction, false to disable it |
Definition at line 348 of file GPUManager.cpp.
void SkyX::GPUManager::_updateFP | ( | ) |
Update fragment program materials.
Definition at line 68 of file GPUManager.cpp.
void SkyX::GPUManager::addGroundPass | ( | Ogre::Pass * | GroundPass, |
const Ogre::Real & | AtmosphereRadius, | ||
const Ogre::SceneBlendType & | SBT = Ogre::SBT_ADD |
||
) |
Add ground pass (Use for atmospheric scattering effect on the terrain)
GroundPass | Ground pass |
AtmosphereRaidus | Atmosphere radius (typically far carmera clip plane) |
SBT | Scene blend type |
TODO
Definition at line 41 of file GPUManager.cpp.
|
inline |
Get moon material name.
Definition at line 102 of file GPUManager.h.
const Ogre::String SkyX::GPUManager::getSkydomeMaterialName | ( | ) | const |
Get skydome material name.
Definition at line 341 of file GPUManager.cpp.
void SkyX::GPUManager::setGpuProgramParameter | ( | const GpuProgram & | GpuP, |
const Ogre::String & | Name, | ||
const int & | Value, | ||
const bool & | UpdateGroundPasses = true |
||
) |
Set gpu program int parameter.
GpuP | Gpu program type (Vertex/Fragment) |
Name | param name |
Value | value |
UpdateGroundPasses | true to update ground passes |
Definition at line 99 of file GPUManager.cpp.
void SkyX::GPUManager::setGpuProgramParameter | ( | const GpuProgram & | GpuP, |
const Ogre::String & | Name, | ||
const Ogre::Real & | Value, | ||
const bool & | UpdateGroundPasses = true |
||
) |
Set gpu program Ogre::Real parameter.
GpuP | Gpu program type (Vertex/Fragment) |
Name | param name |
Value | value |
UpdateGroundPasses | true to update ground passes |
Definition at line 159 of file GPUManager.cpp.
void SkyX::GPUManager::setGpuProgramParameter | ( | const GpuProgram & | GpuP, |
const Ogre::String & | Name, | ||
const Ogre::Vector2 & | Value, | ||
const bool & | UpdateGroundPasses = true |
||
) |
Set gpu program Ogre::Vector2 parameter.
GpuP | Gpu program type (Vertex/Fragment) |
Name | param name |
Value | value |
UpdateGroundPasses | true to update ground passes |
Definition at line 219 of file GPUManager.cpp.
void SkyX::GPUManager::setGpuProgramParameter | ( | const GpuProgram & | GpuP, |
const Ogre::String & | Name, | ||
const Ogre::Vector3 & | Value, | ||
const bool & | UpdateGroundPasses = true |
||
) |
Set gpu program Ogre::Vector3 parameter.
GpuP | Gpu program type (Vertex/Fragment) |
Name | param name |
Value | value |
UpdateGroundPasses | true to update ground passes |
Definition at line 281 of file GPUManager.cpp.
|
private |
Ground pass vector.
Definition at line 136 of file GPUManager.h.
|
private |
Skydome material.
Definition at line 134 of file GPUManager.h.
|
private |
SkyX parent pointer.
Definition at line 139 of file GPUManager.h.