TinyRendererVisualShapeConverter set near/far for its own camera.
This commit is contained in:
@@ -726,7 +726,12 @@ void TinyRendererVisualShapeConverter::render(const float viewMat[16], const flo
|
||||
clearColor.bgra[3] = 255;
|
||||
|
||||
clearBuffers(clearColor);
|
||||
float near = projMat[14]/(projMat[10]-1);
|
||||
float far = projMat[14]/(projMat[10]+1);
|
||||
|
||||
m_data->m_camera.setCameraFrustumNear( near);
|
||||
m_data->m_camera.setCameraFrustumFar(far);
|
||||
|
||||
|
||||
ATTRIBUTE_ALIGNED16(btScalar modelMat[16]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user