mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-06 10:10:25 +02:00
Merging r6488 through r6491 from trunk to ogl-es branch
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6492 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@ -76,6 +76,11 @@ public:
|
||||
driver->setMaterial(material);
|
||||
driver->drawMeshBuffer(mb);
|
||||
}
|
||||
|
||||
// Resetting after each rendering so direct calls to render() for parent node continue to work
|
||||
// Assuming each pass only runs once
|
||||
RenderPass = ESNRP_NONE;
|
||||
ParentDoesRender = true;
|
||||
}
|
||||
|
||||
//! Renders the node.
|
||||
@ -84,10 +89,6 @@ public:
|
||||
video::IVideoDriver* driver = SceneManager->getVideoDriver();
|
||||
driver->setTransform(video::ETS_WORLD, MeshNodeParent.getAbsoluteTransformation());
|
||||
renderBuffer(driver);
|
||||
|
||||
// resetting each time so direct calls to render() for parent node continue to work
|
||||
RenderPass = ESNRP_NONE;
|
||||
ParentDoesRender = true;
|
||||
}
|
||||
|
||||
virtual const core::aabbox3d<f32>& getBoundingBox() const IRR_OVERRIDE
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "IVideoDriver.h"
|
||||
#include "IAnimatedMesh.h"
|
||||
#include "IMesh.h"
|
||||
#include "IMeshBuffer.h"
|
||||
#include "os.h"
|
||||
#include "IGUISkin.h"
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "IWriteFile.h"
|
||||
#include "IXMLWriter.h"
|
||||
#include "IMesh.h"
|
||||
#include "IMeshBuffer.h"
|
||||
#include "IAttributes.h"
|
||||
|
||||
namespace irr
|
||||
|
@ -219,7 +219,7 @@ void CMeshSceneNode::render()
|
||||
}
|
||||
}
|
||||
|
||||
if ( bufRenderNode->getRenderPass() == renderPass )
|
||||
if ( bufRenderNode->getRenderPass() == renderPass || renderPass == ESNRP_NONE)
|
||||
bufRenderNode->renderBuffer(driver);
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "SVertexIndex.h"
|
||||
#include "SLight.h"
|
||||
#include "SExposedVideoData.h"
|
||||
#include "SOverrideMaterial.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( disable: 4996)
|
||||
|
@ -573,10 +573,14 @@ void COpenGLSLMaterialRenderer::startUseProgram()
|
||||
|
||||
void COpenGLSLMaterialRenderer::stopUseProgram()
|
||||
{
|
||||
// Not going to reset irrGlUseProgram/extGlUseProgramObject as it shouldn't really matter
|
||||
// Necessary as fixed function pipeline breaks if programs are not reset to 0
|
||||
if (Program)
|
||||
Driver->extGlUseProgramObject(0);
|
||||
if (Program2)
|
||||
Driver->irrGlUseProgram(0);
|
||||
|
||||
// Force reset of material to ensure OnSetMaterial will be called or we can miss
|
||||
// the next UseProgram call
|
||||
// the next UseProgram call as stopUseProgram can be called from anywhere
|
||||
Driver->DoResetRenderStates();
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "CParticleAnimatedMeshSceneNodeEmitter.h"
|
||||
#include "IAnimatedMeshSceneNode.h"
|
||||
#include "IMesh.h"
|
||||
#include "IMeshBuffer.h"
|
||||
#include "os.h"
|
||||
|
||||
namespace irr
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "IVideoDriver.h"
|
||||
#include "IFileSystem.h"
|
||||
#include "SAnimatedMesh.h"
|
||||
#include "SOverrideMaterial.h"
|
||||
#include "CMeshCache.h"
|
||||
#include "IXMLWriter.h"
|
||||
#include "ISceneUserDataSerializer.h"
|
||||
|
Reference in New Issue
Block a user