Remove bloat, add some clipping plane functionality.

This commit is contained in:
tamasmeszaros 2019-12-16 15:36:43 +01:00
parent 878f8a8ead
commit 5aaddd82a4
3 changed files with 168 additions and 168 deletions

View file

@ -517,7 +517,13 @@ void Camera::view()
glRotatef(m_rot.y(), 1.0, 0.0, 0.0);
glRotatef(m_rot.x(), 0.0, 0.0, 1.0);
// glClipPlane()
if (m_clip_z > 0.) {
GLdouble plane[] = {0., 0., 1., m_clip_z};
glClipPlane(GL_CLIP_PLANE0, plane);
glEnable(GL_CLIP_PLANE0);
} else {
glDisable(GL_CLIP_PLANE0);
}
}
void PerspectiveCamera::set_screen(long width, long height)