#109353 - Rajveer - Fri Nov 17, 2006 3:21 pm
Hi guys, I have a skybox around my terrain which I need to disable the z-buffer for as it comes infront of alot of my polygons. Problem is, nobody knows how to do it. I've tried scaling the skybox larger than I am right now, but it gets to a point where it doesn't render properly even when increasing the projection farclip limit. I'm not sure about using the display capture as from what I've heard it uses up one frame extra, reducing the frame-rate from 60 to 30. So...any ideas?
P.S. I need to use a skybox as my game rotates in all directions and using a scrolling background wont look right.
#109400 - Lick - Sat Nov 18, 2006 12:51 am
Yeah, there's no glDisable(GL_DEPTH_TEST); or anything.. But you could try glFlush(). Don't really know if it works.
Some people use GL_FLUSH = 0 instead of glFlush().
Also, BIT(14) of the Polygon Attribute register might disable the depth buffer.
_________________
http://licklick.wordpress.com
#109417 - Rajveer - Sat Nov 18, 2006 3:10 am
Cheers for the reply!
I think that topic meant that using GL_FLUSH = 0 enabled depth testing with an orthographic view? But I'm not sure.
Something weird, enabling bit 14 of the Polygon Attribute like you mentioned using glPolyFmt stopped the following polygons being rendered...wonder what it does! Perhaps it's something to do with the z-buffer...
#109711 - Valmond - Mon Nov 20, 2006 5:09 pm
Isn't it so that there is no z-buffer but a s-buffer (scanline)?
Which means that you probably have to make a twopass rendreing (with
a capture after the skybox rendering) or have a skybox like a "normal object".
_________________
N?fer & LudLib
#109717 - Rockard - Mon Nov 20, 2006 6:25 pm
heh, I just learnt this stuff in class. Will need it for my 3d->sprite so that I don't need to screw around with scale and z to keep "sprites" from looking weird when colliding at the same z. Looking forward to if something similiar is discovered in nds.
#109729 - omaremad - Mon Nov 20, 2006 8:34 pm
I use a 2D BMP_BG, i decompress a jpeg that i move opposite to my camera rotations, it saves allot of vram. Just rember to get layer 0 on top and a clear colour of black.