Don't upload / bind skinning ubo if not supported
This commit is contained in:
parent
1f23e6e783
commit
2e2345289c
@ -268,11 +268,12 @@ void ShaderBasedRenderer::renderScene(scene::ICameraSceneNode * const camnode,
|
||||
bool hasShadow,
|
||||
bool forceRTT)
|
||||
{
|
||||
if(CVS->isARBUniformBufferObjectUsable())
|
||||
if (CVS->isARBUniformBufferObjectUsable())
|
||||
{
|
||||
glBindBufferBase(GL_UNIFORM_BUFFER, 0, SharedGPUObjects::getViewProjectionMatricesUBO());
|
||||
glBindBufferBase(GL_UNIFORM_BUFFER, 1, SharedGPUObjects::getLightingDataUBO());
|
||||
glBindBufferBase(GL_UNIFORM_BUFFER, 2, SharedGPUObjects::getSkinningUBO());
|
||||
if (CVS->supportsHardwareSkinning())
|
||||
glBindBufferBase(GL_UNIFORM_BUFFER, 2, SharedGPUObjects::getSkinningUBO());
|
||||
}
|
||||
irr_driver->getSceneManager()->setActiveCamera(camnode);
|
||||
|
||||
|
@ -223,11 +223,12 @@ void SharedGPUObjects::init()
|
||||
initFrustrumVBO();
|
||||
initParticleQuadVBO();
|
||||
|
||||
if(CVS->isARBUniformBufferObjectUsable())
|
||||
if (CVS->isARBUniformBufferObjectUsable())
|
||||
{
|
||||
initShadowVPMUBO();
|
||||
initLightingDataUBO();
|
||||
initSkinningUBO();
|
||||
if (CVS->supportsHardwareSkinning())
|
||||
initSkinningUBO();
|
||||
}
|
||||
|
||||
m_has_been_initialised = true;
|
||||
|
@ -26,8 +26,6 @@
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
|
||||
class RenderInfo;
|
||||
|
||||
enum InstanceType
|
||||
{
|
||||
InstanceTypeThreeTex,
|
||||
|
Loading…
Reference in New Issue
Block a user