Don't upload / bind skinning ubo if not supported

This commit is contained in:
Benau 2016-12-15 12:17:39 +08:00
parent 1f23e6e783
commit 2e2345289c
3 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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;

View File

@ -26,8 +26,6 @@
#include <map>
#include <unordered_map>
class RenderInfo;
enum InstanceType
{
InstanceTypeThreeTex,