jdolan / quake2

Classic Quake II for Mac and Linux.
GNU General Public License v2.0
235 stars 26 forks source link

r_drawworld 0 creates some really weird backward animation #3

Closed asublin closed 8 years ago

asublin commented 8 years ago

Not really a problematic issue but... r_drawworld 0 doesn't draw the world, OK that's fine, but then it also redisplays the items and the menu repeatedly in reverse, really weird. I don't understand why. How to fix that (guidances on where to hack the C code would be welcome)? Thanks!

jdolan commented 8 years ago

Heh, I think the issue is that, with r_drawworld 0, the depth buffer and frame buffer aren't repopulated at each frame, and so you see artifacts from previously drawn frames. This is what happens when you look into a "leak" in your map, if you've ever mapped for Quake before..

Does the problem go away with gl_clear 1?

asublin commented 8 years ago

It works, thanks! However the background is completely red and I don't understand why. Any clue? P.S: sorry for my possibly stupid questions I'm an opengl noob.

jdolan commented 8 years ago

The red/orange background is just what Quake2 uses for glClearColor.