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