i'm rendering a few spheres to the screen and the problem is that when i'm scrolling to the edge of the screen, the spheres are looking more like ellipses than like circles.
so i think i need to switch the camera to orthogonal projection and i tried the following code:
Code: Select all
camera = smgr->addCameraSceneNode(0, core::vector3df(100,100,100), core::vector3df(0,0,0));
core::matrix4 mat;
mat.buildProjectionMatrixOrthoLH(1024,768,-10,200);
camera->setProjectionMatrix(mat, true);
as long as i'm not moving the scene nodes out of the screen, everythings works well, but then the app just chrashes with the typical windows_error(APPCRASH...)
another thing is that i have a zoom method which moves the camera along the z_axis, with the orthoganal camera i can't see it moving, otherwise it works. if i move to a z_value higher than 200 the app chrashes as well, so the zoom_method is probably working:D
so, the questions are, how to avoid the appcrash and how to make the zoom working, as it is supposed to be.
i know i could set the first 2 parameters of the matrix.buildProjectionMatrixOrthoLH(...) function to a higher value, but there must be something else
hope someone knows what to do. i searched the forum, but couldn't find much usefull