isidisi Posted July 28, 2010 Share Posted July 28, 2010 Is posible to change the projection matrix of the camera to a custom matrix? I want to do a 4 x 4 grid, where each tile is a render in order to later join them and obtain a bigger image... then I have to displace and scale after projection matrix in the camera to render each tile. I tried with SetEntityMatrix but it seems not to set the projection matrix, only position and rotation of the camera... Any help? Quote Link to comment Share on other sites More sharing options...
TylerH Posted July 29, 2010 Share Posted July 29, 2010 You would have to utilize the OpenGL API to modify the GL_PROJECTION matrix. Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
isidisi Posted July 29, 2010 Author Share Posted July 29, 2010 I tried and not works, when I do RenderWorld() Leadwerks Engine changes projection matrix with the parameters of the world's camera... is there a way to avoid this? I tried adding some lines in Renderer.cpp: float test[16]; //To check changes in projection matrix. glMatrixMode(GL_PROJECTION); ::glLoadMatrixf(myProjectionMatrix); ::glGetFloatv(GL_PROJECTION_MATRIX, test); //Here test = myProjectionMatrix // Render the scene Wireframe( wiremode ); ::glGetFloatv(GL_PROJECTION_MATRIX, test); //Here test = myProjectionMatrix RenderWorld(); ::glGetFloatv(GL_PROJECTION_MATRIX, test); //Here test != myProjectionMatrix, RenderWorld changed projection matrix before rendering :-( Quote Link to comment Share on other sites More sharing options...
TylerH Posted July 30, 2010 Share Posted July 30, 2010 The only way would be to have the commands in the engine to get/set the camera's matrices exposed. Get/Set CameraProjectionMatrix Get/Set CameraModelViewMatrix Get/Set CameraModelViewProjectionMatrix Feature Request Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.