On 05/27/2012 03:29 AM, tommyl...@eircom.net wrote: > Simply speaking, "near" and "far" clipping planes is something like two > vertical planes in front of your eyes, and the view is rendered between them. > Like hologram generator. Both of the planes must be in front of you, so > "near" must be greater than 0, > the"far" depends on how far you want to see your world. Let's say you set > "far" as 20 and see the rectangle which is 100 units deep, you will see only > 20 units of it (but in the view direction - if not rotated, in Z direction). > In your case "near" is always in front of your eyes, so set it as 0.1, "far" > should be big enough to see quite a lot of the world if it rotates plus > elevation over it, I'd say 5000 should be enough, but you have to check it to > be sure. > As for missing parts of the world, the best trick to hide it is to use fog on > very low settings, so it makes nice blurr, but doesn't affect close range > picture. > > Tomek
Ah. Now it makes sense. I kept thinking the near plane had to be behind the camera to "make sure" close objects were rendered. I just figured out how to freely switch between ortho and projection modes so I can draw pixel-presice OSD's as well as the 3D scene: Public Sub Mode_Ortho() ' Set OpenGL matrices to orthogonal mode. Gl.MatrixMode(Gl.PROJECTION) Gl.LoadIdentity() Glu.Ortho2D(0, sWidth, 0, sHeight) Gl.Scalef(1, -1, 1) End Public Sub Mode_Perspective() ' Set OpenGL matrices to perspective mode. Gl.MatrixMode(Gl.PROJECTION) Gl.LoadIdentity() Glu.Perspective(45, sWidth / sHeight, -1, 1) Gl.Scalef(1, -1, 1) End Lovely. I'm reworking the code now to migrate existing features to the new hybrid ortho/perspective setup. Should look much improved in a few days, "2.5D" as they say. -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sa...@eightvirtues.com phone: (770) 853-6271 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user