23 #ifndef INCLUDED_RENDERER
24 #define INCLUDED_RENDERER
49 class RenderPathVertexShader;
61 #define g_Renderer CRenderer::GetSingleton()
111 void Reset() { memset(
this, 0,
sizeof(*
this)); }
171 bool Open(
int width,
int height);
174 void Resize(
int width,
int height);
Render animated models using a ShaderRenderModifier.
ERenderMode m_TerrainRenderMode
void SetDisplayTerrainPriorities(bool enabled)
void SetObliqueFrustumClipping(const CVector4D &clipPlane)
void SetClearColor(SColor4ub color)
Line-based overlay, with world-space coordinates, rendered in the world potentially behind other obje...
ERenderMode GetTerrainRenderMode() const
CTimeManager & GetTimeManager()
void SetLightEnv(CLightEnv *lightenv)
friend class ShaderInstancingModelRenderer
void Resize(int width, int height)
static RenderPath GetRenderPathByName(const CStr &name)
Billboard sprite overlay, with world-space coordinates, rendered on top of all other objects...
CCamera m_CullCamera
m_CullCamera: determines the frustum for culling and shadowmap calculations
void RecomputeSystemShaderDefines()
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...
void SetViewport(const SViewPort &)
friend class PolygonSortModelRenderer
CShaderDefines m_SystemShaderDefines
friend class FixedFunctionModelRenderer
void RenderTransparentModels(const CShaderDefines &context, ETransparentMode transparentMode, const CFrustum *frustum=0)
bool m_DisplayTerrainPriorities
Enable rendering of terrain tile priority text overlay, for debugging.
const Caps & GetCapabilities() const
GetCapabilities: Return which OpenGL capabilities are available and enabled.
Public API for simulation system.
static CStr GetRenderPathName(RenderPath rp)
CVertexBuffer: encapsulation of ARB_vertex_buffer_object, also supplying some additional functionalit...
This interface accepts renderable objects.
CCamera m_ViewCamera
m_ViewCamera: determines the eye position for rendering
Render non-animated (but potentially moving) models using a ShaderRenderModifier. ...
SkyManager * m_SkyManager
m_SkyManager: the SkyManager object used for sky textures and settings
const CCamera & GetCullCamera() const
CRendererInternals * m
Private data that is not needed by inline functions.
Texture manager with asynchronous loading and automatic DDS conversion/compression.
bool m_DisplayFrustum
m_DisplayFrustum: Render the cull frustum and other data that may be interesting to evaluate culling ...
Handle m_hCompositeAlphaMap
void SetTerrainRenderMode(ERenderMode mode)
CMaterialManager & GetMaterialManager()
Textured line overlay, with world-space coordinates, rendered in the world onto the terrain...
void SetViewCamera(const CCamera &camera)
float m_ShadowZBias
m_ShadowZBias: Z bias used when rendering shadows into a depth texture.
bool GetOptionBool(enum Option opt) const
friend class RenderPathVertexShader
Class ModelRenderer: Abstract base class for all model renders.
void SetSimulation(CSimulation2 *simulation)
Set simulation context for rendering purposes.
int m_ShadowMapSize
m_ShadowMapSize: Size of shadow map, or 0 for default.
i64 Status
Error handling system.
static Status ReloadChangedFileCB(void *param, const VfsPath &path)
i64 Handle
`handle' representing a reference to a resource (sound, texture, etc.)
void Submit(CPatch *patch)
Submit a terrain patch that is part of the scene.
const CLightEnv & GetLightEnv()
RenderPath GetRenderPath() const
static void RegisterScriptFunctions(ScriptInterface &scriptInterface)
SScreenRect RenderReflections(const CShaderDefines &context, const CBoundingBoxAligned &scissor)
CTextureManager & GetTextureManager()
void RenderSilhouettes(const CShaderDefines &context)
Represents a mapping of name strings to value strings, for use with #if and #ifdef and similar condit...
TerrainRenderer & GetTerrainRenderer()
struct CRenderer::@49 m_AlphaMapCoords[NumAlphaMaps]
friend class HWLightingModelRenderer
Struct CRendererInternals: Truly hide data that is supposed to be hidden in this structure so it won'...
Rectangular single-quad terrain overlay, in world space coordinates.
WaterManager * m_WaterManager
m_WaterManager: the WaterManager object used for water textures and settings (e.g.
CShaderManager & GetShaderManager()
friend class SortModelRenderer
bool Open(int width, int height)
Scene & GetScene()
Return the scene that is currently being rendered.
WaterManager * GetWaterManager()
GetWaterManager: Return the renderer's water manager.
CParticleManager & GetParticleManager()
ERenderMode GetModelRenderMode() const
SkyManager * GetSkyManager()
GetSkyManager: Return the renderer's sky manager.
void RenderShadowMap(const CShaderDefines &context)
This interface describes a scene to the renderer.
void SubmitNonRecursive(CModel *model)
Submit a model that is part of the scene, without submitting attached models.
CShaderDefines GetSystemShaderDefines()
ERenderMode m_ModelRenderMode
void SetRenderPath(RenderPath rp)
Class TerrainRenderer: Render everything related to the terrain, especially patches and water...
Abstraction around a SpiderMonkey JSContext.
void SetOptionBool(enum Option opt, bool value)
void RenderScene(Scene &scene)
Render the given scene immediately.
const CCamera & GetViewCamera() const
void RenderModels(const CShaderDefines &context, const CFrustum *frustum=0)
SScreenRect RenderRefractions(const CShaderDefines &context, const CBoundingBoxAligned &scissor)
Class CLightEnv: description of a lighting environment - contains all the necessary parameters for re...
bool m_SkipSubmit
m_SkipSubmit: Disable the actual submission of rendering commands to OpenGL.
void RenderTextOverlays()
Render text overlays on top of the scene.
void SetModelRenderMode(ERenderMode mode)
Shader manager: loads and caches shader programs.
void BindTexture(int unit, unsigned int tex)
struct CRenderer::Options m_Options
void RenderPatches(const CShaderDefines &context, const CFrustum *frustum=0)
CPostprocManager & GetPostprocManager()
Class WaterManager: Maintain water settings and textures.
Class SkyManager: Maintain sky settings and textures, and render the sky.