Modify the depth buffer value in TinyRenderer to be consistent as in OpenGL.
This commit is contained in:
@@ -383,3 +383,13 @@ float SimpleCamera::getAspectRatio() const
|
||||
{
|
||||
return m_data->m_aspect;
|
||||
}
|
||||
|
||||
float SimpleCamera::getCameraFrustumFar() const
|
||||
{
|
||||
return m_data->m_frustumZFar;
|
||||
}
|
||||
|
||||
float SimpleCamera::getCameraFrustumNear() const
|
||||
{
|
||||
return m_data->m_frustumZNear;
|
||||
}
|
||||
|
||||
@@ -47,6 +47,9 @@ struct SimpleCamera : public CommonCameraInterface
|
||||
|
||||
virtual void setAspectRatio(float ratio);
|
||||
virtual float getAspectRatio() const;
|
||||
|
||||
virtual float getCameraFrustumFar() const;
|
||||
virtual float getCameraFrustumNear() const;
|
||||
};
|
||||
|
||||
#endif //SIMPLE_CAMERA_H
|
||||
#endif //SIMPLE_CAMERA_H
|
||||
|
||||
Reference in New Issue
Block a user