Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
#include <RenderManager.h>
Classes | |
struct | DistanceLight |
struct | SolidRenderable |
struct | TransparentRenderable |
Public Member Functions | |
void | addFrameEventReceiver (FrameEventReceiver *newEventReceiver) |
void | convertProjectionMatrix (const core::matrix4 &matrix, core::matrix4 &dest) |
Converts a uniform projection matrix suitable for the current render system. | |
Camera * | createCamera (scene::Node *parent=NULL) |
Creates a camera to be managed by this scene manager. | |
Camera * | createCamera (const std::string &name, scene::Node *parent=NULL) |
Font * | createFont (const std::string &fontFilename) |
Creates a font to be managed by this render manager. | |
IndexBuffer * | createIndexBuffer (IndexType idxType, u32 numIndexes, resource::BufferUsage usage, bool useShadowBuffer=false) |
Create an index buffer. | |
Light * | createLight (const std::string &name, scene::Node *parent=NULL) |
Light * | createLight (scene::Node *parent=NULL) |
Creates a light to be managed by rendering manager. | |
Model * | createModel (const std::string &meshFilename, scene::Node *parent=NULL) |
Creates a mesh to be managed by rendering manager. | |
Model * | createModel (const std::string &name, const std::string &meshFilename, scene::Node *parent=NULL) |
Model * | createModel (MeshData *meshData, scene::Node *parent=NULL) |
Creates a mesh to be managed by rendering manager. | |
Model * | createModel (const std::string &name, MeshData *meshData, scene::Node *parent=NULL) |
PanelOverlay * | createPanelOverlay () |
Creates an panel overlay to be managed by rendering manager. | |
PanelOverlay * | createPanelOverlay (const std::string &name) |
PixelBuffer * | createPixelBuffer (u32 width, u32 height, u32 depth, resource::PixelFormat format, resource::BufferUsage usage, bool useShadowBuffer=false) |
Create a pixel buffer. | |
Renderable * | createRenderable (scene::Node *parent=NULL) |
Creates a renderable to be managed by this scene manager. | |
Renderable * | createRenderable (const std::string &name, scene::Node *parent=NULL) |
RenderWindow * | createRenderWindow (s32 width, s32 height, s32 colorDepth, bool fullScreen, s32 left=0, s32 top=0, bool depthBuffer=true, void *windowId=NULL) |
Shader * | createShader (const std::string &shaderFilename, const ShaderType &type) |
Creates a shader to be managed by script manager. | |
TextOverlay * | createTextOverlay () |
Creates an text overlay to be managed by rendering manager. | |
TextOverlay * | createTextOverlay (const std::string &name) |
VertexBuffer * | createVertexBuffer (u32 vertexSize, u32 numVertices, resource::BufferUsage usage, bool useShadowBuffer=false) |
Create a vertex buffer. | |
VertexBufferBinding * | createVertexBufferBinding () |
Creates a new vertex buffer binding. | |
VertexDeclaration * | createVertexDeclaration () |
Creates a vertex declaration. | |
Camera * | getCamera (const u32 &id) |
Retrieves a pointer to a camera by id. | |
Font * | getFont (const u32 &id) |
Retrieves a pointer to a font by id. | |
f32 | getHorizontalTexelOffset () |
Returns the horizontal texel offset value required for mapping texel origins to pixel origins. | |
Light * | getLight (const u32 &id) |
Retrieves a pointer to a light by id. | |
RenderWindow * | getMainWindow () |
Retrieve a pointer to the main render window. | |
f32 | getMaximumDepthInputValue () |
Gets the maximum (farthest) depth value to be used when rendering using identity transforms. | |
f32 | getMinimumDepthInputValue () |
Gets the minimum (closest) depth value to be used when rendering using identity transforms. | |
Model * | getModel (const u32 &id) |
Retrieves a pointer to a mesh by id. | |
u32 | getNumberOfCameras () const |
Retrieves the total number of created cameras. | |
u32 | getNumberOfFonts () const |
Retrieves the total number of created fonts. | |
u32 | getNumberOfLights () const |
Retrieves the total number of created lights. | |
u32 | getNumberOfOverlays () const |
Retrieves the total number of created overlays. | |
u32 | getNumberOfRenderables () const |
Retrieves the total number of created renderables. | |
u32 | getNumberOfShaders () const |
Retrieves the total number of created shaders. | |
Overlay * | getOverlay (const u32 &id) |
Retrieves a pointer to an overlay by id. | |
Renderable * | getRenderable (const u32 &id) |
Retrieves a pointer to a renderable by id. | |
RenderWindow * | getRenderWindow (const u32 &id) |
Retrieves a pointer to the a render window. | |
Shader * | getShader (const u32 &id) |
Retrieves a pointer to a shader by id. | |
f32 | getVerticalTexelOffset () |
Returns the vertical texel offset value required for mapping texel origins to pixel origins. | |
s32 | getViewportHeight () const |
Gets the height of the destination viewport in pixels. | |
s32 | getViewportWidth () const |
Gets the width of the destination viewport in pixels. | |
void | registerDefaultFactories () |
void | removeAllCameras () |
Removes (and destroys) all cameras from the rendering. | |
void | removeAllFonts () |
Removes (and destroys) all fonts from the rendering. | |
void | removeAllIndexBuffers () |
Removes all index buffers. | |
void | removeAllLights () |
Removes (and destroys) all lights from the rendering. | |
void | removeAllOverlays () |
Removes (and destroys) all overlays from the rendering. | |
void | removeAllPixelBuffer () |
Removes all pixel buffers. | |
void | removeAllRenderables () |
Removes (and destroys) all renderables from the rendering. | |
void | removeAllRenderWindows () |
Removes all rendering windows. | |
void | removeAllShaders () |
Removes (and destroys) all shaders. | |
void | removeAllVertexBufferBindings () |
Removes all vertex buffer bindings. | |
void | removeAllVertexBuffers () |
Removes all vertex buffers. | |
void | removeAllVertexDeclarations () |
Removes all vertex declarations. | |
void | removeCamera (Camera *cam) |
Removes a camera from the rendering. | |
void | removeCamera (const u32 &id) |
Removes a camera from the rendering. | |
void | removeDefaultFactories () |
void | removeFont (const u32 &id) |
Removes a font from the rendering. | |
void | removeFont (Font *fnt) |
Removes a font from the rendering. | |
void | removeFrameEventReceiver (FrameEventReceiver *oldEventReceiver) |
void | removeIndexBuffer (IndexBuffer *buf) |
Removes an index buffer. | |
void | removeLight (Light *lt) |
Removes a light from the rendering. | |
void | removeLight (const u32 &id) |
Removes a light from the rendering. | |
void | removeModel (Model *model) |
Removes a mesh from the rendering. | |
void | removeModel (const u32 &id) |
Removes a mesh from the rendering. | |
void | removeOverlay (Overlay *overlay) |
Removes an ovelay from the rendering. | |
void | removeOverlay (const u32 &id) |
Removes an overlay from the rendering. | |
void | removePixelBuffer (PixelBuffer *buf) |
Removes a pixel buffer. | |
void | removeRenderable (const u32 &id) |
Removes a renderable from the rendering. | |
void | removeRenderable (Renderable *renderable) |
Removes a renderable from the rendering. | |
void | removeRenderDriver () |
void | removeRenderWindow (const u32 &id) |
Removes a rendering window. | |
void | removeShader (const u32 &id) |
Removes a shader. | |
void | removeShader (Shader *shader) |
Removes a shader. | |
void | removeVertexBuffer (VertexBuffer *buf) |
Removes a vertex buffer. | |
void | removeVertexBufferBinding (VertexBufferBinding *binding) |
Removes a vertex buffer binding. | |
void | removeVertexDeclaration (VertexDeclaration *decl) |
Removes a vertex declaration. | |
RenderManager () | |
void | setAmbientLight (const Color &ambient=Color::White) |
void | setFog (FogMode mode=FM_NONE, const Color &color=Color::White, f32 density=0.001f, f32 start=0.0f, f32 end=1.0f) |
void | setMainWindow (RenderWindow *window) |
Sets a pointer to the main render window. | |
void | setRenderDriver (RenderDriver *driver) |
void | start () |
void | stop () |
~RenderManager () | |
Static Public Member Functions | |
static RenderManager * | getInstance () |
Get instance. | |
Protected Member Functions | |
void | beginFrame (Viewport *vp) |
void | endFrame () |
void | findLightsAffectingFrustum (Camera *cam) |
void | findLightsAffectingRenderables (Renderable *renderable) |
void | findVisibleRenderables (Camera *cam) |
void | fireFrameEnded () |
void | fireFrameStarted () |
void | initializeImpl () |
void | render (Camera *cam, Viewport *vp) |
void | renderSingleOverlay (Overlay *overlay, Camera *cam, Viewport *vp) |
void | renderSingleRenderable (Renderable *renderable) |
void | renderVisibleOverlays (Camera *cam, Viewport *vp) |
void | renderVisibleRenderables () |
void | setCurrentViewport (Viewport *vp) |
void | setMaterial (Material *mat) |
void | uninitializeImpl () |
void | updateImpl (f32 elapsedTime) |
Protected Attributes | |
Color | mAmbientLight |
Current ambient light. | |
std::map< u32, Camera * > | mCameras |
Central list of cameras - for easy memory management and lookup. | |
Viewport * | mCurrentViewport |
Current viewport (dest for current rendering operations). | |
FontFactory * | mDefaultFontFactory |
Material * | mDefaultMaterial |
The default material. | |
MaterialFactory * | mDefaultMaterialFactory |
MeshDataFactory * | mDefaultMeshDataFactory |
std::vector< DistanceLight > | mDistanceLights |
Color | mFogColor |
f32 | mFogDensity |
f32 | mFogEnd |
FogMode | mFogMode |
f32 | mFogStart |
std::map< u32, Font * > | mFonts |
Central list of fonts - for easy memory management and lookup. | |
Frustum * | mFrustum |
std::list< IndexBuffer * > | mIndexBuffers |
u32 | mLastEndTime |
u32 | mLastStartTime |
s32 | mLastViewportHeight |
s32 | mLastViewportWidth |
std::map< u32, Light * > | mLights |
Central list of lights - for easy memory management and lookup. | |
std::list< Light * > | mLightsAffectingFrustum |
RenderWindow * | mMainWindow |
std::map< u32, Overlay * > | mOverlays |
Central list of overlays - for easy memory management and lookup. | |
std::list< PixelBuffer * > | mPixelBuffers |
std::map< u32, Renderable * > | mRenderables |
Central list of renderables - for easy memory management and lookup. | |
RenderDriver * | mRenderDriver |
RenderOperation | mRenderOperation |
std::map< u32, RenderWindow * > | mRenderWindows |
ShaderParamData | mShaderParamData |
Shader auto parameter data. | |
std::map< u32, Shader * > | mShaders |
Central list of shaders - for easy memory management and lookup. | |
std::vector< SolidRenderable > | mSolidRenderables |
platform::Timer * | mTimer |
std::vector < TransparentRenderable > | mTransparentRenderables |
bool | mUpdateRender |
Render loop control. | |
std::list< VertexBufferBinding * > | mVertexBufferBindings |
std::list< VertexBuffer * > | mVertexBuffers |
std::list< VertexDeclaration * > | mVertexDeclarations |
Static Protected Attributes | |
static std::list < FrameEventReceiver * > | mFrameEventReceivers |
Static Private Member Functions | |
static void ENGINE_CALLBACK | releaseFontImpl (resource::Resource *resource) |
Releases a Font resource. | |
static void ENGINE_CALLBACK | releaseMaterialImpl (resource::Resource *resource) |
Releases a Material resource. | |
static void ENGINE_CALLBACK | releaseMeshDataImpl (resource::Resource *resource) |
Releases a MeshData resource. |
Rendering Manager.
This class handles everything related to rendering.
render::RenderManager::RenderManager | ( | ) |
References render::Color::Black, render::FM_NONE, getInstance(), mAmbientLight, mCurrentViewport, mDefaultFontFactory, mDefaultMaterial, mDefaultMaterialFactory, mDefaultMeshDataFactory, mFogColor, mFogDensity, mFogEnd, mFogMode, mFogStart, mFrustum, mLastEndTime, mLastStartTime, mLastViewportHeight, mLastViewportWidth, mMainWindow, engine::Object::mObjectType, mRenderDriver, mRenderOperation, mTimer, mUpdateRender, engine::OT_RENDER_MANAGER, and render::Color::White.
render::RenderManager::~RenderManager | ( | ) |
References getInstance(), mDefaultFontFactory, mDefaultMaterialFactory, and mDefaultMeshDataFactory.
void render::RenderManager::addFrameEventReceiver | ( | FrameEventReceiver * | newEventReceiver | ) |
References mFrameEventReceivers.
void render::RenderManager::beginFrame | ( | Viewport * | vp | ) | [protected] |
References render::RenderDriver::beginFrame(), getInstance(), engine::LL_ERROR, and mRenderDriver.
Referenced by render().
void render::RenderManager::convertProjectionMatrix | ( | const core::matrix4 & | matrix, |
core::matrix4 & | dest | ||
) |
Converts a uniform projection matrix suitable for the current render system.
References render::RenderDriver::convertProjectionMatrix(), and mRenderDriver.
Referenced by render::Camera::updateProjection().
Camera * render::RenderManager::createCamera | ( | scene::Node * | parent = NULL | ) |
Creates a camera to be managed by this scene manager.
References engine::Object::getID(), getInstance(), and mCameras.
Camera * render::RenderManager::createCamera | ( | const std::string & | name, |
scene::Node * | parent = NULL |
||
) |
References engine::Object::getID(), getInstance(), and mCameras.
Font * render::RenderManager::createFont | ( | const std::string & | fontFilename | ) |
Creates a font to be managed by this render manager.
References engine::Object::getID(), getInstance(), mFonts, and resource::RT_RESOURCE_FONT.
IndexBuffer * render::RenderManager::createIndexBuffer | ( | IndexType | idxType, |
u32 | numIndexes, | ||
resource::BufferUsage | usage, | ||
bool | useShadowBuffer = false |
||
) |
Create an index buffer.
References render::RenderDriver::createIndexBuffer(), mIndexBuffers, and mRenderDriver.
Referenced by render::TextOverlay::allocateMemory(), render::DebugRenderable::initializeGeometry(), and render::PanelOverlay::initializeImpl().
Light * render::RenderManager::createLight | ( | scene::Node * | parent = NULL | ) |
Creates a light to be managed by rendering manager.
References engine::Object::getID(), getInstance(), and mLights.
Light * render::RenderManager::createLight | ( | const std::string & | name, |
scene::Node * | parent = NULL |
||
) |
References engine::Object::getID(), getInstance(), and mLights.
Model * render::RenderManager::createModel | ( | const std::string & | meshFilename, |
scene::Node * | parent = NULL |
||
) |
Creates a mesh to be managed by rendering manager.
References engine::Object::getID(), getInstance(), mRenderables, and resource::RT_RESOURCE_MESH_DATA.
Model * render::RenderManager::createModel | ( | const std::string & | name, |
const std::string & | meshFilename, | ||
scene::Node * | parent = NULL |
||
) |
References engine::Object::getID(), getInstance(), mRenderables, and resource::RT_RESOURCE_MESH_DATA.
Model * render::RenderManager::createModel | ( | const std::string & | name, |
MeshData * | meshData, | ||
scene::Node * | parent = NULL |
||
) |
References engine::Object::getID(), getInstance(), and mRenderables.
Model * render::RenderManager::createModel | ( | MeshData * | meshData, |
scene::Node * | parent = NULL |
||
) |
Creates a mesh to be managed by rendering manager.
References engine::Object::getID(), getInstance(), and mRenderables.
PanelOverlay * render::RenderManager::createPanelOverlay | ( | ) |
Creates an panel overlay to be managed by rendering manager.
References engine::Object::getID(), and mOverlays.
PanelOverlay * render::RenderManager::createPanelOverlay | ( | const std::string & | name | ) |
References engine::Object::getID(), and mOverlays.
PixelBuffer * render::RenderManager::createPixelBuffer | ( | u32 | width, |
u32 | height, | ||
u32 | depth, | ||
resource::PixelFormat | format, | ||
resource::BufferUsage | usage, | ||
bool | useShadowBuffer = false |
||
) |
Create a pixel buffer.
References render::RenderDriver::createPixelBuffer(), mPixelBuffers, and mRenderDriver.
Renderable * render::RenderManager::createRenderable | ( | scene::Node * | parent = NULL | ) |
Creates a renderable to be managed by this scene manager.
References engine::Object::getID(), getInstance(), and mRenderables.
Renderable * render::RenderManager::createRenderable | ( | const std::string & | name, |
scene::Node * | parent = NULL |
||
) |
References engine::Object::getID(), getInstance(), and mRenderables.
RenderWindow * render::RenderManager::createRenderWindow | ( | s32 | width, |
s32 | height, | ||
s32 | colorDepth, | ||
bool | fullScreen, | ||
s32 | left = 0 , |
||
s32 | top = 0 , |
||
bool | depthBuffer = true , |
||
void * | windowId = NULL |
||
) |
References render::RenderDriver::createRenderWindow(), engine::Object::getID(), getInstance(), core::intToString(), mRenderDriver, and mRenderWindows.
Referenced by initializeImpl().
Shader * render::RenderManager::createShader | ( | const std::string & | shaderFilename, |
const ShaderType & | type | ||
) |
Creates a shader to be managed by script manager.
References engine::Object::getID(), getInstance(), mShaders, resource::RT_RESOURCE_SHADER, and render::Shader::setShaderType().
Referenced by render::Material::setFragmentShader(), render::Material::setGeometryShader(), and render::Material::setVertexShader().
TextOverlay * render::RenderManager::createTextOverlay | ( | ) |
Creates an text overlay to be managed by rendering manager.
References engine::Object::getID(), and mOverlays.
TextOverlay * render::RenderManager::createTextOverlay | ( | const std::string & | name | ) |
References engine::Object::getID(), and mOverlays.
VertexBuffer * render::RenderManager::createVertexBuffer | ( | u32 | vertexSize, |
u32 | numVertices, | ||
resource::BufferUsage | usage, | ||
bool | useShadowBuffer = false |
||
) |
Create a vertex buffer.
References render::RenderDriver::createVertexBuffer(), mRenderDriver, and mVertexBuffers.
Referenced by render::TextOverlay::allocateMemory(), render::DebugRenderable::initializeGeometry(), and render::PanelOverlay::initializeImpl().
VertexBufferBinding * render::RenderManager::createVertexBufferBinding | ( | ) |
Creates a new vertex buffer binding.
References mVertexBufferBindings.
Referenced by render::VertexData::VertexData().
VertexDeclaration * render::RenderManager::createVertexDeclaration | ( | ) |
Creates a vertex declaration.
References mVertexDeclarations.
Referenced by render::VertexData::VertexData().
void render::RenderManager::endFrame | ( | ) | [protected] |
References render::RenderDriver::endFrame(), and mRenderDriver.
Referenced by render().
void render::RenderManager::findLightsAffectingFrustum | ( | Camera * | cam | ) | [protected] |
References render::Camera::getFrustum(), mFrustum, mLights, and mLightsAffectingFrustum.
Referenced by render().
void render::RenderManager::findLightsAffectingRenderables | ( | Renderable * | renderable | ) | [protected] |
References render::RenderManager::DistanceLight::distance, scene::Node::getAbsolutePosition(), render::Renderable::getBoundingSphere(), render::RenderManager::DistanceLight::light, render::LT_DIRECTIONAL, mDistanceLights, mLightsAffectingFrustum, and core::sphere3d::Radius.
Referenced by renderSingleRenderable().
void render::RenderManager::findVisibleRenderables | ( | Camera * | cam | ) | [protected] |
References render::RenderManager::TransparentRenderable::distance, scene::Node::getAbsolutePosition(), render::Camera::getFrustum(), engine::Object::getID(), render::Material::isTransparent(), render::Frustum::isVisible(), render::RenderManager::SolidRenderable::materialID, mFrustum, mRenderables, mSolidRenderables, mTransparentRenderables, render::RenderManager::SolidRenderable::renderable, and render::RenderManager::TransparentRenderable::renderable.
Referenced by render().
void render::RenderManager::fireFrameEnded | ( | ) | [protected] |
References mFrameEventReceivers.
Referenced by updateImpl().
void render::RenderManager::fireFrameStarted | ( | ) | [protected] |
References mFrameEventReceivers.
Referenced by updateImpl().
Retrieves a pointer to a camera by id.
References mCameras.
Retrieves a pointer to a font by id.
References mFonts.
f32 render::RenderManager::getHorizontalTexelOffset | ( | ) |
Returns the horizontal texel offset value required for mapping texel origins to pixel origins.
References render::RenderDriver::getHorizontalTexelOffset(), and mRenderDriver.
RenderManager * render::RenderManager::getInstance | ( | ) | [static] |
Get instance.
Reimplemented from core::Singleton< RenderManager >.
Referenced by render::TextOverlay::allocateMemory(), beginFrame(), createCamera(), createFont(), createLight(), createModel(), createRenderable(), createRenderWindow(), createShader(), render::DebugRenderable::initializeGeometry(), initializeImpl(), render::PanelOverlay::initializeImpl(), registerDefaultFactories(), scene::Scene::removeAllNodes(), removeCamera(), removeDefaultFactories(), removeLight(), removeRenderable(), RenderManager(), render::Material::setFragmentShader(), render::Material::setGeometryShader(), render::Material::setVertexShader(), start(), stop(), uninitializeImpl(), render::TextOverlay::updatePositionBinding(), render::PanelOverlay::updatePositionBinding(), render::Camera::updateProjection(), render::TextOverlay::updateTransformImpl(), render::VertexData::VertexData(), ~RenderManager(), and render::VertexData::~VertexData().
Retrieves a pointer to a light by id.
References mLights.
RenderWindow * render::RenderManager::getMainWindow | ( | ) |
Retrieve a pointer to the main render window.
References mMainWindow.
f32 render::RenderManager::getMaximumDepthInputValue | ( | ) |
Gets the maximum (farthest) depth value to be used when rendering using identity transforms.
References render::RenderDriver::getMaximumDepthInputValue(), and mRenderDriver.
Referenced by render::TextOverlay::updatePositionBinding(), and render::PanelOverlay::updatePositionBinding().
f32 render::RenderManager::getMinimumDepthInputValue | ( | ) |
Gets the minimum (closest) depth value to be used when rendering using identity transforms.
References render::RenderDriver::getMinimumDepthInputValue(), and mRenderDriver.
Retrieves a pointer to a mesh by id.
References mRenderables.
u32 render::RenderManager::getNumberOfCameras | ( | ) | const |
Retrieves the total number of created cameras.
References mCameras.
u32 render::RenderManager::getNumberOfFonts | ( | ) | const |
Retrieves the total number of created fonts.
References mFonts.
u32 render::RenderManager::getNumberOfLights | ( | ) | const |
Retrieves the total number of created lights.
References mLights.
u32 render::RenderManager::getNumberOfOverlays | ( | ) | const |
Retrieves the total number of created overlays.
References mOverlays.
u32 render::RenderManager::getNumberOfRenderables | ( | ) | const |
Retrieves the total number of created renderables.
References mRenderables.
u32 render::RenderManager::getNumberOfShaders | ( | ) | const |
Retrieves the total number of created shaders.
References mShaders.
Retrieves a pointer to an overlay by id.
References mOverlays.
Renderable * render::RenderManager::getRenderable | ( | const u32 & | id | ) |
Retrieves a pointer to a renderable by id.
References mRenderables.
RenderWindow * render::RenderManager::getRenderWindow | ( | const u32 & | id | ) |
Retrieves a pointer to the a render window.
References mRenderWindows.
Retrieves a pointer to a shader by id.
References mShaders.
f32 render::RenderManager::getVerticalTexelOffset | ( | ) |
Returns the vertical texel offset value required for mapping texel origins to pixel origins.
References render::RenderDriver::getVerticalTexelOffset(), and mRenderDriver.
s32 render::RenderManager::getViewportHeight | ( | ) | const |
Gets the height of the destination viewport in pixels.
References mLastViewportHeight.
Referenced by render::TextOverlay::updateTransformImpl().
s32 render::RenderManager::getViewportWidth | ( | ) | const |
Gets the width of the destination viewport in pixels.
References mLastViewportWidth.
Referenced by render::TextOverlay::updatePositionBinding(), and render::TextOverlay::updateTransformImpl().
void render::RenderManager::initializeImpl | ( | ) | [protected, virtual] |
Reimplemented from engine::Object.
References createRenderWindow(), engine::EngineSettings::getBitdepth(), engine::EngineSettings::getFullscreen(), engine::EngineSettings::getHeight(), getInstance(), engine::EngineSettings::getMainWindowId(), platform::Timer::getMilliseconds(), engine::EngineSettings::getWidth(), render::RenderDriver::initialize(), mDefaultMaterial, mDistanceLights, mLastEndTime, mLastStartTime, mMainWindow, mRenderDriver, mSolidRenderables, mTimer, mTransparentRenderables, and resource::RT_RESOURCE_RENDER_MATERIAL.
void render::RenderManager::registerDefaultFactories | ( | ) |
References getInstance(), resource::ResourceManager::getInstance(), mDefaultFontFactory, mDefaultMaterialFactory, mDefaultMeshDataFactory, resource::RT_RESOURCE_FONT, resource::RT_RESOURCE_MESH_DATA, and resource::RT_RESOURCE_RENDER_MATERIAL.
Referenced by engine::EngineManager::registerDefaultFactories().
static void ENGINE_CALLBACK render::RenderManager::releaseFontImpl | ( | resource::Resource * | resource | ) | [static, private] |
Releases a Font resource.
static void ENGINE_CALLBACK render::RenderManager::releaseMaterialImpl | ( | resource::Resource * | resource | ) | [static, private] |
Releases a Material resource.
static void ENGINE_CALLBACK render::RenderManager::releaseMeshDataImpl | ( | resource::Resource * | resource | ) | [static, private] |
Releases a MeshData resource.
void render::RenderManager::removeAllCameras | ( | ) |
Removes (and destroys) all cameras from the rendering.
References scene::SceneManager::getInstance(), and mCameras.
Referenced by uninitializeImpl().
void render::RenderManager::removeAllFonts | ( | ) |
Removes (and destroys) all fonts from the rendering.
References mFonts.
Referenced by uninitializeImpl().
void render::RenderManager::removeAllIndexBuffers | ( | ) |
Removes all index buffers.
References mIndexBuffers, mRenderDriver, and render::RenderDriver::removeIndexBuffer().
Referenced by uninitializeImpl().
void render::RenderManager::removeAllLights | ( | ) |
Removes (and destroys) all lights from the rendering.
References scene::SceneManager::getInstance(), and mLights.
Referenced by uninitializeImpl().
void render::RenderManager::removeAllOverlays | ( | ) |
Removes (and destroys) all overlays from the rendering.
References mOverlays.
Referenced by uninitializeImpl().
void render::RenderManager::removeAllPixelBuffer | ( | ) |
Removes all pixel buffers.
References mPixelBuffers, mRenderDriver, and render::RenderDriver::removePixelBuffer().
void render::RenderManager::removeAllRenderables | ( | ) |
Removes (and destroys) all renderables from the rendering.
References scene::SceneManager::getInstance(), and mRenderables.
Referenced by uninitializeImpl().
void render::RenderManager::removeAllRenderWindows | ( | ) |
void render::RenderManager::removeAllShaders | ( | ) |
Removes (and destroys) all shaders.
References mShaders.
void render::RenderManager::removeAllVertexBufferBindings | ( | ) |
Removes all vertex buffer bindings.
References mVertexBufferBindings.
Referenced by uninitializeImpl().
void render::RenderManager::removeAllVertexBuffers | ( | ) |
Removes all vertex buffers.
References mRenderDriver, mVertexBuffers, and render::RenderDriver::removeVertexBuffer().
Referenced by uninitializeImpl().
void render::RenderManager::removeAllVertexDeclarations | ( | ) |
void render::RenderManager::removeCamera | ( | const u32 & | id | ) |
Removes a camera from the rendering.
References getInstance(), and mCameras.
void render::RenderManager::removeCamera | ( | Camera * | cam | ) |
Removes a camera from the rendering.
References engine::Object::getID().
void render::RenderManager::removeDefaultFactories | ( | ) |
void render::RenderManager::removeFont | ( | const u32 & | id | ) |
Removes a font from the rendering.
References mFonts.
void render::RenderManager::removeFont | ( | Font * | fnt | ) |
Removes a font from the rendering.
References engine::Object::getID().
void render::RenderManager::removeFrameEventReceiver | ( | FrameEventReceiver * | oldEventReceiver | ) |
References mFrameEventReceivers.
void render::RenderManager::removeIndexBuffer | ( | IndexBuffer * | buf | ) |
Removes an index buffer.
References mIndexBuffers, mRenderDriver, and render::RenderDriver::removeIndexBuffer().
void render::RenderManager::removeLight | ( | Light * | lt | ) |
Removes a light from the rendering.
References engine::Object::getID().
void render::RenderManager::removeLight | ( | const u32 & | id | ) |
Removes a light from the rendering.
References getInstance(), and mLights.
void render::RenderManager::removeModel | ( | Model * | model | ) |
Removes a mesh from the rendering.
References engine::Object::getID(), and removeRenderable().
void render::RenderManager::removeModel | ( | const u32 & | id | ) |
Removes a mesh from the rendering.
References removeRenderable().
void render::RenderManager::removeOverlay | ( | Overlay * | overlay | ) |
Removes an ovelay from the rendering.
References engine::Object::getID().
void render::RenderManager::removeOverlay | ( | const u32 & | id | ) |
Removes an overlay from the rendering.
References mOverlays.
void render::RenderManager::removePixelBuffer | ( | PixelBuffer * | buf | ) |
Removes a pixel buffer.
References mPixelBuffers, mRenderDriver, and render::RenderDriver::removePixelBuffer().
void render::RenderManager::removeRenderable | ( | const u32 & | id | ) |
Removes a renderable from the rendering.
References getInstance(), and mRenderables.
void render::RenderManager::removeRenderable | ( | Renderable * | renderable | ) |
Removes a renderable from the rendering.
References engine::Object::getID().
Referenced by removeModel().
void render::RenderManager::removeRenderDriver | ( | ) |
References mRenderDriver.
void render::RenderManager::removeRenderWindow | ( | const u32 & | id | ) |
Removes a rendering window.
References mRenderWindows.
void render::RenderManager::removeShader | ( | Shader * | shader | ) |
Removes a shader.
References engine::Object::getID().
void render::RenderManager::removeVertexBuffer | ( | VertexBuffer * | buf | ) |
Removes a vertex buffer.
References mRenderDriver, mVertexBuffers, and render::RenderDriver::removeVertexBuffer().
void render::RenderManager::removeVertexBufferBinding | ( | VertexBufferBinding * | binding | ) |
Removes a vertex buffer binding.
References mVertexBufferBindings.
Referenced by render::VertexData::~VertexData().
void render::RenderManager::removeVertexDeclaration | ( | VertexDeclaration * | decl | ) |
Removes a vertex declaration.
References mVertexDeclarations.
Referenced by render::VertexData::~VertexData().
References render::Color::A, render::Color::B, beginFrame(), render::RenderDriver::beginGeometryCount(), render::RenderDriver::disableTextureUnitsFrom(), endFrame(), render::RenderDriver::endGeometryCount(), ENGINE_UNIT, findLightsAffectingFrustum(), findVisibleRenderables(), render::FM_NONE, render::Color::G, render::Viewport::getActualHeight(), render::Viewport::getActualWidth(), render::Frustum::getCorners(), render::RenderDriver::getFaceCount(), engine::Object::getID(), render::Camera::getProjectionMatrixRS(), render::Camera::getViewMatrix(), core::matrix4::IDENTITY, mAmbientLight, mCameras, mDefaultMaterial, mFrustum, mLastViewportHeight, mLastViewportWidth, mLights, mRenderDriver, mShaderParamData, core::vector3d::NEGATIVE_UNIT_Z, render::Viewport::notifyRenderedFaces(), render::Color::R, render::RenderDriver::renderAxes(), render::RenderDriver::renderFrustumVolume(), render::RenderDriver::renderGrid(), render::RenderDriver::renderTestPlane(), renderVisibleOverlays(), renderVisibleRenderables(), render::RenderDriver::renderWorldAxes(), render::SBF_ONE, render::SBF_ZERO, render::RenderDriver::setAmbientLight(), render::ShaderParamData::setCurrentCamera(), render::ShaderParamData::setCurrentViewport(), setCurrentViewport(), render::RenderDriver::setDepthBufferCheckEnabled(), render::RenderDriver::setDepthBufferWriteEnabled(), render::RenderDriver::setFog(), render::RenderDriver::setLightingEnabled(), setMaterial(), render::RenderDriver::setProjectionMatrix(), render::RenderDriver::setSceneBlending(), render::RenderDriver::setViewMatrix(), render::RenderDriver::setWorldMatrix(), render::ST_FRAGMENT, render::ST_GEOMETRY, render::ST_VERTEX, render::RenderDriver::unbindShader(), core::vector3d::UNIT_X, and core::vector3d::UNIT_Y.
Referenced by updateImpl().
void render::RenderManager::renderSingleOverlay | ( | Overlay * | overlay, |
Camera * | cam, | ||
Viewport * | vp | ||
) | [protected] |
References core::matrix4::buildProjectionMatrixOrtho(), render::FM_NONE, render::Viewport::getActualHeight(), render::Viewport::getActualWidth(), render::Overlay::getMaterial(), render::Overlay::getMetricsMode(), render::Camera::getNearClipDistance(), render::Overlay::getRenderOperation(), core::matrix4::getTranslation(), render::Renderable::getWorldMatrix(), render::MM_PIXELS, render::MM_RELATIVE, render::MM_RELATIVE_ASPECT_ADJUSTED, mRenderDriver, mRenderOperation, render::RenderDriver::render(), render::RenderDriver::setFog(), render::RenderDriver::setLightingEnabled(), setMaterial(), render::RenderDriver::setProjectionMatrix(), core::matrix4::setTranslation(), and render::RenderDriver::setWorldMatrix().
void render::RenderManager::renderSingleRenderable | ( | Renderable * | renderable | ) | [protected] |
References render::RenderDriver::disableTextureUnitsFrom(), findLightsAffectingRenderables(), render::FM_NONE, scene::Node::getAbsoluteOrientation(), scene::Node::getAbsolutePosition(), render::Renderable::getBoundingBox(), render::Renderable::getBoundingSphere(), render::Renderable::getMaterial(), render::Renderable::getRenderOperation(), render::Renderable::getWorldMatrix(), core::matrix4::IDENTITY, mDistanceLights, mRenderDriver, mRenderOperation, mShaderParamData, core::vector3d::NEGATIVE_UNIT_Z, render::RenderDriver::render(), render::RenderDriver::renderAxes(), render::RenderDriver::renderBoundingBox(), render::RenderDriver::renderBoundingSphere(), render::SBF_ONE, render::SBF_ZERO, render::ShaderParamData::setCurrentLight(), render::ShaderParamData::setCurrentRenderable(), render::RenderDriver::setDepthBufferCheckEnabled(), render::RenderDriver::setDepthBufferWriteEnabled(), render::RenderDriver::setFog(), render::RenderDriver::setLightingEnabled(), render::RenderDriver::setLights(), setMaterial(), render::RenderDriver::setSceneBlending(), render::RenderDriver::setWorldMatrix(), render::ST_FRAGMENT, render::ST_GEOMETRY, render::ST_VERTEX, render::RenderDriver::unbindShader(), core::vector3d::UNIT_X, and core::vector3d::UNIT_Y.
Referenced by renderVisibleRenderables().
References core::matrix4::buildProjectionMatrixOrtho(), render::FM_NONE, render::Viewport::getActualHeight(), render::Viewport::getActualWidth(), render::Camera::getNearClipDistance(), render::Viewport::getShowOverlays(), core::matrix4::getTranslation(), render::MM_PIXELS, render::MM_RELATIVE, render::MM_RELATIVE_ASPECT_ADJUSTED, mOverlays, mRenderDriver, mRenderOperation, render::RenderDriver::render(), render::RenderDriver::setFog(), render::RenderDriver::setLightingEnabled(), setMaterial(), render::RenderDriver::setProjectionMatrix(), core::matrix4::setTranslation(), and render::RenderDriver::setWorldMatrix().
Referenced by render().
void render::RenderManager::renderVisibleRenderables | ( | ) | [protected] |
References mSolidRenderables, mTransparentRenderables, and renderSingleRenderable().
Referenced by render().
void render::RenderManager::setAmbientLight | ( | const Color & | ambient = Color::White | ) |
References mAmbientLight.
void render::RenderManager::setCurrentViewport | ( | Viewport * | vp | ) | [protected] |
References render::Viewport::clearUpdatedFlag(), render::Viewport::isUpdated(), mCurrentViewport, mRenderDriver, and render::RenderDriver::setViewport().
Referenced by render().
void render::RenderManager::setMainWindow | ( | RenderWindow * | window | ) |
Sets a pointer to the main render window.
References mMainWindow.
void render::RenderManager::setMaterial | ( | Material * | mat | ) | [protected] |
References render::RenderDriver::bindShader(), render::RenderDriver::disableTextureUnitsFrom(), GAME_MAX_TEXTURE_LAYERS, render::Material::getAmbient(), render::Material::getDepthCheckEnabled(), render::Material::getDepthWriteEnabled(), render::Material::getDestBlendFactor(), render::Material::getDiffuse(), render::Material::getEmissive(), render::Material::getFogColor(), render::Material::getFogDensity(), render::Material::getFogEnd(), render::Material::getFogMode(), render::Material::getFogOverride(), render::Material::getFogStart(), render::Material::getFragmentShader(), render::Material::getGeometryShader(), render::Material::getLightingEnabled(), render::Material::getNumTextureUnits(), render::Material::getShadingMode(), render::Material::getShininess(), render::Material::getSourceBlendFactor(), render::Material::getSpecular(), render::Material::getTextureUnit(), render::Material::getVertexShader(), render::Material::hasFragmentShader(), render::Material::hasGeometryShader(), render::Material::hasVertexShader(), render::RenderDriver::isShaderBound(), mFogColor, mFogDensity, mFogEnd, mFogMode, mFogStart, mRenderDriver, mShaderParamData, render::RenderDriver::setDepthBufferCheckEnabled(), render::RenderDriver::setDepthBufferWriteEnabled(), render::RenderDriver::setFog(), render::RenderDriver::setLightingEnabled(), render::RenderDriver::setSceneBlending(), render::RenderDriver::setShadingType(), render::RenderDriver::setSurfaceParams(), render::RenderDriver::setTextureUnitSettings(), render::ST_FRAGMENT, render::ST_GEOMETRY, render::ST_VERTEX, render::RenderDriver::unbindShader(), and render::Shader::updateAutoParameters().
Referenced by render(), renderSingleOverlay(), renderSingleRenderable(), and renderVisibleOverlays().
void render::RenderManager::setRenderDriver | ( | render::RenderDriver * | driver | ) |
References mRenderDriver.
void render::RenderManager::start | ( | ) |
References getInstance(), mRenderDriver, mRenderWindows, and mUpdateRender.
Referenced by setFog(), and engine::EngineManager::start().
void render::RenderManager::stop | ( | ) |
References getInstance(), mRenderDriver, mUpdateRender, and render::RenderDriver::stop().
Referenced by engine::EngineManager::stop().
void render::RenderManager::uninitializeImpl | ( | ) | [protected, virtual] |
Removes all Vertex Buffers.
Removes all Index Buffers.
Reimplemented from engine::Object.
References getInstance(), mDistanceLights, mFrustum, mLightsAffectingFrustum, mMainWindow, mSolidRenderables, mTimer, mTransparentRenderables, removeAllCameras(), removeAllFonts(), removeAllIndexBuffers(), removeAllLights(), removeAllOverlays(), removeAllRenderables(), removeAllRenderWindows(), removeAllVertexBufferBindings(), removeAllVertexBuffers(), and removeAllVertexDeclarations().
void render::RenderManager::updateImpl | ( | f32 | elapsedTime | ) | [protected, virtual] |
Color render::RenderManager::mAmbientLight [protected] |
Current ambient light.
Referenced by render(), RenderManager(), and setAmbientLight().
std::map<u32, Camera*> render::RenderManager::mCameras [protected] |
Central list of cameras - for easy memory management and lookup.
Referenced by createCamera(), getCamera(), getNumberOfCameras(), removeAllCameras(), removeCamera(), and render().
Viewport* render::RenderManager::mCurrentViewport [protected] |
Current viewport (dest for current rendering operations).
Referenced by RenderManager(), and setCurrentViewport().
FontFactory* render::RenderManager::mDefaultFontFactory [protected] |
Referenced by registerDefaultFactories(), RenderManager(), and ~RenderManager().
Material* render::RenderManager::mDefaultMaterial [protected] |
The default material.
Referenced by initializeImpl(), render(), and RenderManager().
Referenced by registerDefaultFactories(), RenderManager(), and ~RenderManager().
Referenced by registerDefaultFactories(), RenderManager(), and ~RenderManager().
std::vector<DistanceLight> render::RenderManager::mDistanceLights [protected] |
Referenced by findLightsAffectingRenderables(), initializeImpl(), renderSingleRenderable(), and uninitializeImpl().
Color render::RenderManager::mFogColor [protected] |
Referenced by RenderManager(), setFog(), and setMaterial().
f32 render::RenderManager::mFogDensity [protected] |
Referenced by RenderManager(), setFog(), and setMaterial().
f32 render::RenderManager::mFogEnd [protected] |
Referenced by RenderManager(), setFog(), and setMaterial().
FogMode render::RenderManager::mFogMode [protected] |
Referenced by RenderManager(), setFog(), and setMaterial().
f32 render::RenderManager::mFogStart [protected] |
Referenced by RenderManager(), setFog(), and setMaterial().
std::map<u32, Font*> render::RenderManager::mFonts [protected] |
Central list of fonts - for easy memory management and lookup.
Referenced by createFont(), getFont(), getNumberOfFonts(), removeAllFonts(), and removeFont().
std::list< FrameEventReceiver * > render::RenderManager::mFrameEventReceivers [static, protected] |
Frustum* render::RenderManager::mFrustum [protected] |
Referenced by findLightsAffectingFrustum(), findVisibleRenderables(), render(), RenderManager(), and uninitializeImpl().
std::list<IndexBuffer*> render::RenderManager::mIndexBuffers [protected] |
Referenced by createIndexBuffer(), removeAllIndexBuffers(), and removeIndexBuffer().
u32 render::RenderManager::mLastEndTime [protected] |
Referenced by initializeImpl(), and RenderManager().
u32 render::RenderManager::mLastStartTime [protected] |
Referenced by initializeImpl(), and RenderManager().
s32 render::RenderManager::mLastViewportHeight [protected] |
Referenced by getViewportHeight(), render(), and RenderManager().
s32 render::RenderManager::mLastViewportWidth [protected] |
Referenced by getViewportWidth(), render(), and RenderManager().
std::map<u32, Light*> render::RenderManager::mLights [protected] |
Central list of lights - for easy memory management and lookup.
Referenced by createLight(), findLightsAffectingFrustum(), getLight(), getNumberOfLights(), removeAllLights(), removeLight(), and render().
std::list<Light*> render::RenderManager::mLightsAffectingFrustum [protected] |
Referenced by findLightsAffectingFrustum(), findLightsAffectingRenderables(), and uninitializeImpl().
RenderWindow* render::RenderManager::mMainWindow [protected] |
Referenced by getMainWindow(), initializeImpl(), RenderManager(), setMainWindow(), and uninitializeImpl().
std::map<u32, Overlay*> render::RenderManager::mOverlays [protected] |
Central list of overlays - for easy memory management and lookup.
Referenced by createPanelOverlay(), createTextOverlay(), getNumberOfOverlays(), getOverlay(), removeAllOverlays(), removeOverlay(), renderVisibleOverlays(), and updateImpl().
std::list<PixelBuffer*> render::RenderManager::mPixelBuffers [protected] |
Referenced by createPixelBuffer(), removeAllPixelBuffer(), and removePixelBuffer().
std::map<u32, Renderable*> render::RenderManager::mRenderables [protected] |
Central list of renderables - for easy memory management and lookup.
Referenced by createModel(), createRenderable(), findVisibleRenderables(), getModel(), getNumberOfRenderables(), getRenderable(), removeAllRenderables(), and removeRenderable().
RenderDriver* render::RenderManager::mRenderDriver [protected] |
Referenced by beginFrame(), convertProjectionMatrix(), createIndexBuffer(), createPixelBuffer(), createRenderWindow(), createVertexBuffer(), endFrame(), getHorizontalTexelOffset(), getMaximumDepthInputValue(), getMinimumDepthInputValue(), getVerticalTexelOffset(), initializeImpl(), removeAllIndexBuffers(), removeAllPixelBuffer(), removeAllVertexBuffers(), removeIndexBuffer(), removePixelBuffer(), removeRenderDriver(), removeVertexBuffer(), render(), RenderManager(), renderSingleOverlay(), renderSingleRenderable(), renderVisibleOverlays(), setCurrentViewport(), setMaterial(), setRenderDriver(), start(), and stop().
Referenced by RenderManager(), renderSingleOverlay(), renderSingleRenderable(), and renderVisibleOverlays().
std::map<u32, RenderWindow*> render::RenderManager::mRenderWindows [protected] |
Referenced by createRenderWindow(), getRenderWindow(), removeAllRenderWindows(), removeRenderWindow(), start(), and updateImpl().
Shader auto parameter data.
Referenced by render(), renderSingleRenderable(), and setMaterial().
std::map<u32, Shader*> render::RenderManager::mShaders [protected] |
Central list of shaders - for easy memory management and lookup.
Referenced by createShader(), getNumberOfShaders(), getShader(), removeAllShaders(), and removeShader().
std::vector<SolidRenderable> render::RenderManager::mSolidRenderables [protected] |
Referenced by findVisibleRenderables(), initializeImpl(), renderVisibleRenderables(), and uninitializeImpl().
platform::Timer* render::RenderManager::mTimer [protected] |
Referenced by initializeImpl(), RenderManager(), and uninitializeImpl().
std::vector<TransparentRenderable> render::RenderManager::mTransparentRenderables [protected] |
Referenced by findVisibleRenderables(), initializeImpl(), renderVisibleRenderables(), and uninitializeImpl().
bool render::RenderManager::mUpdateRender [protected] |
Render loop control.
Referenced by RenderManager(), start(), and stop().
std::list<VertexBufferBinding*> render::RenderManager::mVertexBufferBindings [protected] |
Referenced by createVertexBufferBinding(), removeAllVertexBufferBindings(), and removeVertexBufferBinding().
std::list<VertexBuffer*> render::RenderManager::mVertexBuffers [protected] |
Referenced by createVertexBuffer(), removeAllVertexBuffers(), and removeVertexBuffer().
std::list<VertexDeclaration*> render::RenderManager::mVertexDeclarations [protected] |
Referenced by createVertexDeclaration(), removeAllVertexDeclarations(), and removeVertexDeclaration().
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:09 by
Doxygen
(1.7.4)
|