RigsofRods
Soft-body Physics Simulation
Public Types | Public Member Functions | Private Member Functions | Private Attributes
SkyX::GPUManager Class Reference

#include <GPUManager.h>

+ Collaboration diagram for SkyX::GPUManager:

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...
 
SkyXmSkyX
 SkyX parent pointer. More...
 

Detailed Description

Definition at line 33 of file GPUManager.h.

Member Enumeration Documentation

◆ GpuProgram

Gpu program enum.

Enumerator
GPUP_VERTEX 
GPUP_FRAGMENT 

Definition at line 38 of file GPUManager.h.

Constructor & Destructor Documentation

◆ GPUManager()

SkyX::GPUManager::GPUManager ( SkyX s)

Constructor.

Parameters
sParent SkyX pointer

Definition at line 30 of file GPUManager.cpp.

+ Here is the call graph for this function:

◆ ~GPUManager()

SkyX::GPUManager::~GPUManager ( )

Destructor.

Definition at line 37 of file GPUManager.cpp.

Member Function Documentation

◆ _notifySkydomeMaterialChanged()

void SkyX::GPUManager::_notifySkydomeMaterialChanged ( )
inline

Notify skydome material changed.

Remarks
Only for internal use

Definition at line 115 of file GPUManager.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _setTextureHWGammaCorrection()

void SkyX::GPUManager::_setTextureHWGammaCorrection ( const Ogre::String &  n,
const bool &  g 
)
private

Set texture HW gamma correction.

Parameters
nTexture name
gTrue to enable gamma correction, false to disable it

Definition at line 348 of file GPUManager.cpp.

+ Here is the caller graph for this function:

◆ _updateFP()

void SkyX::GPUManager::_updateFP ( )

Update fragment program materials.

Remarks
Only for internal use

Definition at line 68 of file GPUManager.cpp.

+ Here is the call graph for this function:

◆ addGroundPass()

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)

Parameters
GroundPassGround pass
AtmosphereRaidusAtmosphere radius (typically far carmera clip plane)
SBTScene blend type

TODO

Definition at line 41 of file GPUManager.cpp.

+ Here is the call graph for this function:

◆ getMoonMaterialName()

const Ogre::String SkyX::GPUManager::getMoonMaterialName ( ) const
inline

Get moon material name.

Returns
Moon material name

Definition at line 102 of file GPUManager.h.

+ Here is the caller graph for this function:

◆ getSkydomeMaterialName()

const Ogre::String SkyX::GPUManager::getSkydomeMaterialName ( ) const

Get skydome material name.

Returns
Skydome material name

Definition at line 341 of file GPUManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setGpuProgramParameter() [1/4]

void SkyX::GPUManager::setGpuProgramParameter ( const GpuProgram GpuP,
const Ogre::String &  Name,
const int &  Value,
const bool &  UpdateGroundPasses = true 
)

Set gpu program int parameter.

Parameters
GpuPGpu program type (Vertex/Fragment)
Nameparam name
Valuevalue
UpdateGroundPassestrue to update ground passes

Definition at line 99 of file GPUManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setGpuProgramParameter() [2/4]

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.

Parameters
GpuPGpu program type (Vertex/Fragment)
Nameparam name
Valuevalue
UpdateGroundPassestrue to update ground passes

Definition at line 159 of file GPUManager.cpp.

+ Here is the call graph for this function:

◆ setGpuProgramParameter() [3/4]

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.

Parameters
GpuPGpu program type (Vertex/Fragment)
Nameparam name
Valuevalue
UpdateGroundPassestrue to update ground passes

Definition at line 219 of file GPUManager.cpp.

+ Here is the call graph for this function:

◆ setGpuProgramParameter() [4/4]

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.

Parameters
GpuPGpu program type (Vertex/Fragment)
Nameparam name
Valuevalue
UpdateGroundPassestrue to update ground passes

Definition at line 281 of file GPUManager.cpp.

+ Here is the call graph for this function:

Field Documentation

◆ mGroundPasses

std::vector<Ogre::Pass*> SkyX::GPUManager::mGroundPasses
private

Ground pass vector.

Definition at line 136 of file GPUManager.h.

◆ mSkydomeMaterial

Ogre::MaterialPtr SkyX::GPUManager::mSkydomeMaterial
private

Skydome material.

Definition at line 134 of file GPUManager.h.

◆ mSkyX

SkyX* SkyX::GPUManager::mSkyX
private

SkyX parent pointer.

Definition at line 139 of file GPUManager.h.


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