Nothing entered.
[http://sourceforge.net/p/ufoai/bugs/1952 Item 1952] imported from sourceforge.net tracker on 2013-01-28 19:14:56
in trunk, r21139.
Open a new game, rotate earth until the moon is behind earth. zoom on earth, the moon pass through earth.
I think this is due to this line (in r_state.c):
glOrtho(0, viddef.width, viddef.height, 0, 9999.0f, SKYBOX_DEPTH);
that should be "glOrtho(0, viddef.width, viddef.height, 0, SKYBOX_DEPTH, 9999.0f);"
I already started to fix that, but reverted it because it changes the sign of all depth value in 2D mode (eg all models in base are flipped). This is something I plan to do later (after 2.3, we really have more important stuff to do now): I need to check that, and all model modifications angles in .ufo script is going to take time. I just use this bug tracker as a reminder ;)
I reverted this fix in r21054. Log was:
"* reverted glOrtho() fix I made in r20990, in order to have model drawn in the good direction
* I still think this is not the proper way to render the scene (see: http://www.opengl.org/sdk/docs/man/xhtml/glOrtho.xml -- for us the values behind the viewer are the positive values)
* (that makes the bug 'moon can pass through earth if you zoom on earth when moon is behind' reappear)"
Note that when we call glOrtho() in MYgluPerspective(), the fourth paramter is smaller than fifth as I would expect (see web link above) expected.
The thing I don't understand is that in r21053, the models on the geoscape are invisible on my eeePC (debian Lenny), whereas I can see them on my other computer (debien Etch). Mattn told me he could see the models too. Further testing needed.
This problem will probably need to be fixed before I start improving the drawing on model on geoscape (that is: us z depth not only for sphere but also for models and make models rotate instead of the hack I made and that is currently in trunk)
Please add any comment if you can enlight me on that subject ;)
===== Comments Ported from Sourceforge =====
====== bayo-fr (2009-07-15 19:36:28) ======
I fix it in r25183
I remove the depth test and sort the rendering from sun, moon, earth atmospher (semi transparent), and earth. Then it should be slower than the last code.
Maybe we also can activate the depth test rendering the earth, then the sun, the moon and the earth atmospher, it should be faster. But it is not easy to me to change the opengl code.