// Projection Transformation
// =========================
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum( (-H_SCREENEDGE-my_camera.eye_pos[COORD_X]) * nearplane/my_camera.eye_pos[COORD_Z] * 0.3, // left
(H_SCREENEDGE-my_camera.eye_pos[COORD_X]) * nearplane/my_camera.eye_pos[COORD_Z] * 0.3, // right
(-V_SCREENEDGE-my_camera.eye_pos[COORD_Y]) * nearplane/my_camera.eye_pos[COORD_Z] * 0.3, // bottom
(V_SCREENEDGE-my_camera.eye_pos[COORD_Y]) * nearplane/my_camera.eye_pos[COORD_Z] * 0.3, // top
nearplane, // zNear
VIEWFARPLANE); // zFar
// Objects
// =======
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
// Need to translate the model geometry due to the camera position transformation.
glTranslatef(-my_camera.eye_pos[COORD_X], -my_camera.eye_pos[COORD_Y], -my_camera.eye_pos[COORD_Z] * 0.6 + 0.25);
I have this above code in OpenGL. I want to import the same in Irrlicht camera.
Is it needed to make the projection matrix in Irrlicht?
I noticed there is only,
camera->getViewMatrix();
and there is NO setViewMatrix() for the camera.
Please let me know how to proceed with this.