|
0 A.D. | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
IJSObject | +--CJSObject, SceneCollector, Singleton | +--CRendererin Renderer.h
Inner Classes, Typedefs, and Enums | |
enum |
CRenderer::anonymous_enum_1
|
enum |
CRenderer::anonymous_enum_2
|
struct |
CRenderer::anonymous_struct_1
|
struct |
CRenderer::Caps
|
enum |
CRenderer::Option
|
struct |
CRenderer::Options
|
enum |
CRenderer::RenderPath
|
struct |
CRenderer::Stats
|
Field Summary | |
protected CRendererInternals* |
m
|
protected GLuint[ MaxTextureUnits ] |
m_ActiveTextures
|
protected CRenderer::anonymous_struct_1[ NumAlphaMaps ] |
m_AlphaMapCoords
|
protected CRenderer::Caps |
m_Caps
|
protected float[ 4 ] |
m_ClearColor
|
protected CCamera |
m_CullCamera
m_CullCamera: determines the frustum for culling and shadowmap calculations |
protected int |
m_Depth
|
protected bool |
m_DisableCopyShadow
m_DisableCopyShadow: For debugging purpose: Disable copying of shadow data into the shadow texture (when EXT_fbo is not available) |
protected bool |
m_DisplayFrustum
m_DisplayFrustum: Render the cull frustum and other data that may be interesting to evaluate culling and shadow map calculations Can be controlled from JS via renderer. |
protected bool |
m_FastPlayerColor
|
protected int |
m_FrameCounter
|
protected Handle |
m_hCompositeAlphaMap
|
protected int |
m_Height
|
protected CLightEnv* |
m_LightEnv
|
protected ERenderMode |
m_ModelRenderMode
|
CRenderer::Options |
m_Options
|
bool |
m_RenderTerritories
m_RenderTerritories: Turn territory boundary rendering on or off. |
int |
m_ShadowMapSize
m_ShadowMapSize: Size of shadow map, or 0 for default. |
float |
m_ShadowZBias
m_ShadowZBias: Z bias used when rendering shadows into a depth texture. |
bool |
m_SkipSubmit
m_SkipSubmit: Disable the actual submission of rendering commands to OpenGL. |
protected SkyManager* |
m_SkyManager
m_SkyManager: the SkyManager object used for sky textures and settings |
protected bool |
m_SortAllTransparent
m_SortAllTransparent: If true, all transparent models are rendered using the TransparencyRenderer which performs sorting. |
protected CRenderer::Stats |
m_Stats
|
protected ERenderMode |
m_TerrainRenderMode
|
protected RenderPathVertexShader* |
m_VertexShader
If false, use a multipass fallback for player colors. |
protected CCamera |
m_ViewCamera
m_ViewCamera: determines the eye position for rendering |
protected WaterManager* |
m_WaterManager
m_WaterManager: the WaterManager object used for water textures and settings (e.g. water color, water height) |
protected int |
m_Width
|
Fields inherited from class CJSObject |
m_NativeProperties, m_NonsharedProperties, m_ScriptProperties, m_EngineOwned, JSI_class |
Constructor Summary | |
CRenderer()
CRenderer destructor |
|
~CRenderer()
EnumCaps: build card cap bits |
Method Summary | |
void |
BeginFrame()
SetClearColor: set color used to clear screen in BeginFrame() |
void |
BindTexture( int unit, GLuint tex )
SetTexture: set the given unit to reference the given texture; pass a null texture to disable texturing on any unit |
protected void |
DisplayFrustum()
SetSceneCamera: setup projection and transform of camera and adjust viewport to current view The camera always represents the actual camera used to render a scene, not any virtual camera used for shadow rendering or reflections. |
void |
EndFrame()
DisplayFrustum: debug displays - white: cull camera frustum - red: bounds of shadow casting objects |
protected void |
EnumCaps()
|
float |
GetAspect() const
|
const CRenderer::Caps& |
GetCapabilities() const
GetCapabilities: Return which OpenGL capabilities are available and enabled. |
const CCamera& |
GetCullCamera() const
|
bool |
GetDisableCopyShadow() const
|
int |
GetFrameCounter() const
|
int |
GetHeight() const
|
const CLightEnv& |
GetLightEnv()
|
ERenderMode |
GetModelRenderMode() const
|
CMatrix3D |
GetModelViewProjectionMatrix()
SetObliqueFrustumClipping: change the near plane to the given clip plane (in world space) Based on code from Game Programming Gems 5, from http://www. |
bool |
GetOptionBool( enum CRenderer::Option opt ) const
SetOptionColor: set color renderer option void CRenderer::SetOptionColor(Option UNUSED(opt),const RGBAColor& UNUSED(value)) { // switch (opt) { // default: debug_warn("CRenderer::SetOptionColor: unknown option"); // break; // } } |
CRenderer::RenderPath |
GetRenderPath() const
|
CRenderer::RenderPath |
GetRenderPathByName( const CStr& name )
SetFastPlayerColor |
static CStr |
GetRenderPathName( CRenderer::RenderPath rp )
|
SkyManager* |
GetSkyManager()
GetSkyManager: Return the renderer's sky manager. |
const CRenderer::Stats& |
GetStats()
|
ERenderMode |
GetTerrainRenderMode() const
|
const CCamera& |
GetViewCamera() const
|
WaterManager* |
GetWaterManager()
GetWaterManager: Return the renderer's water manager. |
int |
GetWidth() const
|
bool |
IsTextureTransparent( CTexture* texture )
|
protected jsval |
JSI_GetDepthTextureBits( JSContext* )
|
protected jsval |
JSI_GetFastPlayerColor( JSContext* )
|
protected jsval |
JSI_GetRenderPath( JSContext* )
|
protected jsval |
JSI_GetSky( JSContext* )
|
protected jsval |
JSI_GetUseDepthTexture( JSContext* )
|
protected void |
JSI_SetDepthTextureBits( JSContext* ctx, jsval newval )
|
protected void |
JSI_SetFastPlayerColor( JSContext* ctx, jsval newval )
|
protected void |
JSI_SetRenderPath( JSContext* ctx, jsval newval )
|
protected void |
JSI_SetSky( JSContext* ctx, jsval newval )
|
protected void |
JSI_SetUseDepthTexture( JSContext* ctx, jsval newval )
|
int |
LoadAlphaMaps()
UnloadAlphaMaps: frees the resources allocates by LoadAlphaMaps |
bool |
LoadTexture( CTexture* texture, u32 wrapflags )
BindTexture: bind a GL texture object to current active unit |
bool |
Open( int width, int height, int depth )
|
protected void |
RenderModels()
|
protected void |
RenderPatches()
|
protected void |
RenderReflections()
RenderRefractions: render the water refractions to the refraction texture |
protected void |
RenderRefractions()
RenderSubmissions: force rendering of any batched objects |
void |
RenderScene( Scene* scene )
LoadTexture: try and load the given texture; set clamp/repeat flags on texture object if necessary |
protected void |
RenderShadowMap()
|
protected void |
RenderSubmissions()
EndFrame: signal frame end |
protected void |
RenderTransparentModels()
GetModelViewProjectionMatrix: save the current OpenGL model-view-projection matrix |
void |
Resize( int width, int height )
SetOptionBool: set boolean renderer option |
protected static void |
ScriptingInit()
|
void |
SetClearColor( u32 color )
|
void |
SetFastPlayerColor( bool fast )
BeginFrame: signal frame start |
void |
SetLightEnv( CLightEnv* lightenv )
|
void |
SetModelRenderMode( ERenderMode mode )
|
protected void |
SetObliqueFrustumClipping( const CVector4D& clipPlane, int sign )
Private data that is not needed by inline functions |
void |
SetOptionBool( enum CRenderer::Option opt, bool value )
GetOptionBool: get boolean renderer option |
void |
SetOptionFloat( enum CRenderer::Option opt, float val )
GetOptionColor: get color renderer option const RGBAColor& CRenderer::GetOptionColor(Option UNUSED(opt)) const { static const RGBAColor defaultColor(1.0f,1.0f,1.0f,1.0f); // switch (opt) { // default: debug_warn("CRenderer::GetOptionColor: unknown option"); // break; // } return defaultColor; } |
void |
SetRenderPath( CRenderer::RenderPath rp )
|
void |
SetSceneCamera( const CCamera& viewCamera, const CCamera& cullCamera )
Set up the camera used for rendering the next scene; this includes setting OpenGL state like viewport, projection and modelview matrices. |
void |
SetTerrainRenderMode( ERenderMode mode )
|
void |
SetTexture( int unit, CTexture* texture )
IsTextureTransparent: return true if given texture is transparent, else false - note texture must be loaded beforehand |
void |
SetViewport( const SViewPort& vp )
|
protected void |
Submit( CPatch* patch )
|
protected void |
SubmitNonRecursive( CModel* model )
Render the given scene |
void |
UnloadAlphaMaps()
Scripting Interface |
Methods inherited from class CJSObject |
ScriptingInit, ScriptingShutdown, GetProperty, SetProperty, HasProperty, AddProperty, AddProperty, AddProperty, AddMethod, AddProperty, AddLocalProperty, GetScript, CreateScriptObject, ReleaseScriptObject, Shutdown |
Methods inherited from class SceneCollector |
SubmitRecursive, Submit, SubmitNonRecursive |
Methods inherited from class Singleton |
GetSingleton, GetSingletonPtr, IsInitialised |
Methods inherited from class IJSObject |
HasProperty, GetProperty, AddProperty, AddProperty |
Field Detail |
protected CRendererInternals* m;
protected GLuint m_ActiveTextures[ MaxTextureUnits ];
protected CRenderer::anonymous_struct_1 m_AlphaMapCoords[ NumAlphaMaps ];
protected CRenderer::Caps m_Caps;
protected float m_ClearColor[ 4 ];
protected CCamera m_CullCamera;
CGameView::m_ViewCamera
protected int m_Depth;
protected bool m_DisableCopyShadow;
protected bool m_DisplayFrustum;
protected bool m_FastPlayerColor;
protected int m_FrameCounter;
protected Handle m_hCompositeAlphaMap;
protected int m_Height;
protected CLightEnv* m_LightEnv;
protected ERenderMode m_ModelRenderMode;
public CRenderer::Options m_Options;
public bool m_RenderTerritories;
public int m_ShadowMapSize;
public float m_ShadowZBias;
public bool m_SkipSubmit;
protected SkyManager* m_SkyManager;
protected bool m_SortAllTransparent;
protected CRenderer::Stats m_Stats;
protected ERenderMode m_TerrainRenderMode;
protected RenderPathVertexShader* m_VertexShader;
protected CCamera m_ViewCamera;
CGameView::m_ViewCamera
protected WaterManager* m_WaterManager;
protected int m_Width;
Constructor Detail |
public CRenderer();
public ~CRenderer();
Method Detail |
public void BeginFrame();
public void BindTexture( int unit, GLuint tex );
protected void DisplayFrustum();
public void EndFrame();
protected void EnumCaps();
public float GetAspect() const;
public const CRenderer::Caps& GetCapabilities() const;
public const CCamera& GetCullCamera() const;
public bool GetDisableCopyShadow() const;
public int GetFrameCounter() const;
public int GetHeight() const;
public const CLightEnv& GetLightEnv();
public ERenderMode GetModelRenderMode() const;
public CMatrix3D GetModelViewProjectionMatrix();
public bool GetOptionBool( enum CRenderer::Option opt ) const;
public CRenderer::RenderPath GetRenderPath() const;
public CRenderer::RenderPath GetRenderPathByName( const CStr& name );
public static CStr GetRenderPathName( CRenderer::RenderPath rp );
public SkyManager* GetSkyManager();
public const CRenderer::Stats& GetStats();
public ERenderMode GetTerrainRenderMode() const;
public const CCamera& GetViewCamera() const;
public WaterManager* GetWaterManager();
public int GetWidth() const;
public bool IsTextureTransparent( CTexture* texture );
protected jsval JSI_GetDepthTextureBits( JSContext* );
protected jsval JSI_GetFastPlayerColor( JSContext* );
protected jsval JSI_GetRenderPath( JSContext* );
protected jsval JSI_GetSky( JSContext* );
protected jsval JSI_GetUseDepthTexture( JSContext* );
protected void JSI_SetDepthTextureBits( JSContext* ctx, jsval newval );
protected void JSI_SetFastPlayerColor( JSContext* ctx, jsval newval );
protected void JSI_SetRenderPath( JSContext* ctx, jsval newval );
protected void JSI_SetSky( JSContext* ctx, jsval newval );
protected void JSI_SetUseDepthTexture( JSContext* ctx, jsval newval );
public int LoadAlphaMaps();
public bool LoadTexture( CTexture* texture, u32 wrapflags );
public bool Open( int width, int height, int depth );
protected void RenderModels();
protected void RenderPatches();
protected void RenderReflections();
protected void RenderRefractions();
public void RenderScene( Scene* scene );
protected void RenderShadowMap();
protected void RenderSubmissions();
protected void RenderTransparentModels();
public void Resize( int width, int height );
protected static void ScriptingInit();
public void SetClearColor( u32 color );
public void SetFastPlayerColor( bool fast );
public void SetLightEnv( CLightEnv* lightenv );
public void SetModelRenderMode( ERenderMode mode );
protected void SetObliqueFrustumClipping( const CVector4D& clipPlane, int sign );
public void SetOptionBool( enum CRenderer::Option opt, bool value );
public void SetOptionFloat( enum CRenderer::Option opt, float val );
public void SetRenderPath( CRenderer::RenderPath rp );
public void SetSceneCamera( const CCamera& viewCamera, const CCamera& cullCamera );
viewCamera
- this camera determines the eye position for rendering
cullCamera
- this camera determines the frustum for culling in the renderer and
for shadow calculationspublic void SetTerrainRenderMode( ERenderMode mode );
public void SetTexture( int unit, CTexture* texture );
public void SetViewport( const SViewPort& vp );
protected void Submit( CPatch* patch );
protected void SubmitNonRecursive( CModel* model );
public void UnloadAlphaMaps();
|
0 A.D.
Generated on September 04, 2007 at 18:14 CppDoc v2.4.0 |
|||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |