Move Bullet 2.x demos in a single demo 'AllBullet2Demos', for now only BasicDemo and FeatherstoneDemo is implemented.

This commit is contained in:
erwincoumans
2014-01-05 21:58:30 -08:00
parent 6f9a1c0da2
commit ed73bce9da
18 changed files with 1419 additions and 1330 deletions

View File

@@ -358,6 +358,8 @@ GLInstancingRenderer::GLInstancingRenderer(int maxNumObjectCapacity, int maxShap
{
m_data = new InternalDataRenderer;
m_data->m_totalNumInstances = 0;
sData2 = m_data;
m_data->m_instance_positions_ptr.resize(m_maxNumObjectCapacity*4);
@@ -367,12 +369,8 @@ GLInstancingRenderer::GLInstancingRenderer(int maxNumObjectCapacity, int maxShap
}
GLInstancingRenderer::~GLInstancingRenderer()
void GLInstancingRenderer::removeAllInstances()
{
delete m_data->m_shadowMap;
glDeleteTextures(1,&m_data->m_shadowTexture);
glDeleteTextures(1,&m_data->m_defaultTexturehandle);
for (int i=0;i<m_graphicsInstances.size();i++)
{
if (m_graphicsInstances[i]->m_index_vbo)
@@ -386,6 +384,15 @@ GLInstancingRenderer::~GLInstancingRenderer()
delete m_graphicsInstances[i];
}
m_graphicsInstances.clear();
}
GLInstancingRenderer::~GLInstancingRenderer()
{
delete m_data->m_shadowMap;
glDeleteTextures(1,&m_data->m_shadowTexture);
glDeleteTextures(1,&m_data->m_defaultTexturehandle);
removeAllInstances();
sData2=0;