MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / GLInstancingRenderer

Method GLInstancingRenderer

examples/OpenGLWindow/GLInstancingRenderer.cpp:380–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378//static GLint uniform_texture_diffusePointSprite= 0;
379
380GLInstancingRenderer::GLInstancingRenderer(int maxNumObjectCapacity, int maxShapeCapacityInBytes)
381 : m_textureenabled(true),
382 m_textureinitialized(false),
383 m_screenWidth(0),
384 m_screenHeight(0),
385 m_upAxis(1),
386 m_planeReflectionShapeIndex(-1)
387{
388 m_data = new InternalDataRenderer;
389 m_data->m_maxNumObjectCapacity = maxNumObjectCapacity;
390 m_data->m_maxShapeCapacityInBytes = maxShapeCapacityInBytes;
391
392 m_data->m_totalNumInstances = 0;
393
394 sData2 = m_data;
395
396 m_data->m_instance_positions_ptr.resize(m_data->m_maxNumObjectCapacity * 4);
397 m_data->m_instance_quaternion_ptr.resize(m_data->m_maxNumObjectCapacity * 4);
398 m_data->m_instance_colors_ptr.resize(m_data->m_maxNumObjectCapacity * 4);
399 m_data->m_instance_scale_ptr.resize(m_data->m_maxNumObjectCapacity * 4);
400}
401
402void GLInstancingRenderer::removeAllInstances()
403{

Callers

nothing calls this directly

Calls 1

resizeMethod · 0.45

Tested by

no test coverage detected