mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-01 15:50:27 +02:00
Delete profiler
This commit is contained in:
@ -12,8 +12,6 @@
|
||||
#include "IMaterialRenderer.h"
|
||||
#include "IReadFile.h"
|
||||
#include "IWriteFile.h"
|
||||
#include "EProfileIDs.h"
|
||||
#include "IProfiler.h"
|
||||
|
||||
#include "os.h"
|
||||
|
||||
@ -107,25 +105,6 @@ CSceneManager::CSceneManager(video::IVideoDriver* driver, io::IFileSystem* fs,
|
||||
#ifdef _IRR_COMPILE_WITH_B3D_LOADER_
|
||||
MeshLoaderList.push_back(new CB3DMeshFileLoader(this));
|
||||
#endif
|
||||
|
||||
IRR_PROFILE(
|
||||
static bool initProfile = false;
|
||||
if (!initProfile )
|
||||
{
|
||||
initProfile = true;
|
||||
getProfiler().add(EPID_SM_DRAW_ALL, L"drawAll", L"Irrlicht scene");
|
||||
getProfiler().add(EPID_SM_ANIMATE, L"animate", L"Irrlicht scene");
|
||||
getProfiler().add(EPID_SM_RENDER_CAMERAS, L"cameras", L"Irrlicht scene");
|
||||
getProfiler().add(EPID_SM_RENDER_LIGHTS, L"lights", L"Irrlicht scene");
|
||||
getProfiler().add(EPID_SM_RENDER_SKYBOXES, L"skyboxes", L"Irrlicht scene");
|
||||
getProfiler().add(EPID_SM_RENDER_DEFAULT, L"defaultnodes", L"Irrlicht scene");
|
||||
getProfiler().add(EPID_SM_RENDER_SHADOWS, L"shadows", L"Irrlicht scene");
|
||||
getProfiler().add(EPID_SM_RENDER_TRANSPARENT, L"transp.nodes", L"Irrlicht scene");
|
||||
getProfiler().add(EPID_SM_RENDER_EFFECT, L"effectnodes", L"Irrlicht scene");
|
||||
getProfiler().add(EPID_SM_RENDER_GUI_NODES, L"guinodes", L"Irrlicht scene");
|
||||
getProfiler().add(EPID_SM_REGISTER, L"reg.render.node", L"Irrlicht scene");
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -509,7 +488,6 @@ bool CSceneManager::isCulled(const ISceneNode* node) const
|
||||
//! registers a node for rendering it at a specific time.
|
||||
u32 CSceneManager::registerNodeForRendering(ISceneNode* node, E_SCENE_NODE_RENDER_PASS pass)
|
||||
{
|
||||
IRR_PROFILE(CProfileScope p1(EPID_SM_REGISTER);)
|
||||
u32 taken = 0;
|
||||
|
||||
switch(pass)
|
||||
@ -625,8 +603,6 @@ void CSceneManager::clearAllRegisteredNodesForRendering()
|
||||
//! draws all scene nodes
|
||||
void CSceneManager::drawAll()
|
||||
{
|
||||
IRR_PROFILE(CProfileScope psAll(EPID_SM_DRAW_ALL);)
|
||||
|
||||
if (!Driver)
|
||||
return;
|
||||
|
||||
@ -652,29 +628,24 @@ void CSceneManager::drawAll()
|
||||
Driver->setAllowZWriteOnTransparent(Parameters->getAttributeAsBool(ALLOW_ZWRITE_ON_TRANSPARENT));
|
||||
|
||||
// do animations and other stuff.
|
||||
IRR_PROFILE(getProfiler().start(EPID_SM_ANIMATE));
|
||||
OnAnimate(os::Timer::getTime());
|
||||
IRR_PROFILE(getProfiler().stop(EPID_SM_ANIMATE));
|
||||
|
||||
/*!
|
||||
First Scene Node for prerendering should be the active camera
|
||||
consistent Camera is needed for culling
|
||||
*/
|
||||
IRR_PROFILE(getProfiler().start(EPID_SM_RENDER_CAMERAS));
|
||||
camWorldPos.set(0,0,0);
|
||||
if (ActiveCamera)
|
||||
{
|
||||
ActiveCamera->render();
|
||||
camWorldPos = ActiveCamera->getAbsolutePosition();
|
||||
}
|
||||
IRR_PROFILE(getProfiler().stop(EPID_SM_RENDER_CAMERAS));
|
||||
|
||||
// let all nodes register themselves
|
||||
OnRegisterSceneNode();
|
||||
|
||||
//render camera scenes
|
||||
{
|
||||
IRR_PROFILE(CProfileScope psCam(EPID_SM_RENDER_CAMERAS);)
|
||||
CurrentRenderPass = ESNRP_CAMERA;
|
||||
Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRenderPass) != 0);
|
||||
|
||||
@ -686,7 +657,6 @@ void CSceneManager::drawAll()
|
||||
|
||||
// render skyboxes
|
||||
{
|
||||
IRR_PROFILE(CProfileScope psSkyBox(EPID_SM_RENDER_SKYBOXES);)
|
||||
CurrentRenderPass = ESNRP_SKY_BOX;
|
||||
Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRenderPass) != 0);
|
||||
|
||||
@ -698,7 +668,6 @@ void CSceneManager::drawAll()
|
||||
|
||||
// render default objects
|
||||
{
|
||||
IRR_PROFILE(CProfileScope psDefault(EPID_SM_RENDER_DEFAULT);)
|
||||
CurrentRenderPass = ESNRP_SOLID;
|
||||
Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRenderPass) != 0);
|
||||
|
||||
@ -715,7 +684,6 @@ void CSceneManager::drawAll()
|
||||
|
||||
// render transparent objects.
|
||||
{
|
||||
IRR_PROFILE(CProfileScope psTrans(EPID_SM_RENDER_TRANSPARENT);)
|
||||
CurrentRenderPass = ESNRP_TRANSPARENT;
|
||||
Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRenderPass) != 0);
|
||||
|
||||
@ -731,7 +699,6 @@ void CSceneManager::drawAll()
|
||||
|
||||
// render transparent effect objects.
|
||||
{
|
||||
IRR_PROFILE(CProfileScope psEffect(EPID_SM_RENDER_EFFECT);)
|
||||
CurrentRenderPass = ESNRP_TRANSPARENT_EFFECT;
|
||||
Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRenderPass) != 0);
|
||||
|
||||
@ -747,7 +714,6 @@ void CSceneManager::drawAll()
|
||||
|
||||
// render custom gui nodes
|
||||
{
|
||||
IRR_PROFILE(CProfileScope psEffect(EPID_SM_RENDER_GUI_NODES);)
|
||||
CurrentRenderPass = ESNRP_GUI;
|
||||
Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRenderPass) != 0);
|
||||
|
||||
|
Reference in New Issue
Block a user