remove redundant/wrong glClear
always initialize mpr OpenCL kernels add a second ragdoll to the demo
This commit is contained in:
@@ -366,7 +366,8 @@ void RagDollDemo::initPhysics()
|
|||||||
btVector3 offset(0,3,0);
|
btVector3 offset(0,3,0);
|
||||||
|
|
||||||
RagDoll* doll = new RagDoll(this->m_dynamicsWorld,offset,m_glApp);
|
RagDoll* doll = new RagDoll(this->m_dynamicsWorld,offset,m_glApp);
|
||||||
|
offset.setValue(0,6,0);
|
||||||
|
doll = new RagDoll(this->m_dynamicsWorld,offset,m_glApp);
|
||||||
|
|
||||||
m_glApp->m_instancingRenderer->writeTransforms();
|
m_glApp->m_instancingRenderer->writeTransforms();
|
||||||
|
|
||||||
|
|||||||
@@ -1296,7 +1296,7 @@ void GLInstancingRenderer::renderScene()
|
|||||||
{
|
{
|
||||||
float color[4]={1,1,1,1};
|
float color[4]={1,1,1,1};
|
||||||
renderSceneInternal(B3_CREATE_SHADOWMAP_RENDERMODE);
|
renderSceneInternal(B3_CREATE_SHADOWMAP_RENDERMODE);
|
||||||
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
|
// glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
|
||||||
renderSceneInternal(B3_USE_SHADOWMAP_RENDERMODE);
|
renderSceneInternal(B3_USE_SHADOWMAP_RENDERMODE);
|
||||||
|
|
||||||
} else
|
} else
|
||||||
|
|||||||
@@ -135,7 +135,6 @@ m_unitSphereDirections(m_context,m_queue)
|
|||||||
// sprintf(flags,"-g -s \"%s\"","C:/develop/bullet3_experiments2/opencl/gpu_narrowphase/kernels/sat.cl");
|
// sprintf(flags,"-g -s \"%s\"","C:/develop/bullet3_experiments2/opencl/gpu_narrowphase/kernels/sat.cl");
|
||||||
//#endif
|
//#endif
|
||||||
m_mprPenetrationKernel = 0;
|
m_mprPenetrationKernel = 0;
|
||||||
if (useMprGpu)
|
|
||||||
{
|
{
|
||||||
cl_program mprProg = b3OpenCLUtils::compileCLProgramFromString(m_context,m_device,mprSrc,&errNum,flags,BT_NARROWPHASE_MPR_PATH);
|
cl_program mprProg = b3OpenCLUtils::compileCLProgramFromString(m_context,m_device,mprSrc,&errNum,flags,BT_NARROWPHASE_MPR_PATH);
|
||||||
b3Assert(errNum==CL_SUCCESS);
|
b3Assert(errNum==CL_SUCCESS);
|
||||||
|
|||||||
Reference in New Issue
Block a user