PDA

View Full Version : G:_POINT_SPRITES textures order



aistee
04-19-2009, 03:07 PM
Hi,

when i draw textures in sprites extensions, they have this order - the texture which was drawn at the end is always first ...

So when i rotate my scene (also in z direction), the texture with biggest depth is first ...

How can i change that ? Is this a matter of sprites or texture ?

thx for help :)

Dark Photon
04-19-2009, 05:51 PM
when i draw textures in sprites extensions, they have this order - the texture which was drawn at the end is always first ...

So when i rotate my scene (also in z direction), the texture with biggest depth is first ...

How can i change that ? Is this a matter of sprites or texture ?

It's not quite clear what you're seeing and what you're doing that's causing the problem. But assuming you are properly drawing the particles at distinct eye-space Z values, which end up between the near and far clip planes, then sounds like you don't have depth writes or depth testing properly enabled if the last particle you render is always on top:

glDepthMask( GL_TRUE );
glEnable( GL_DEPTH_TEST );
glDepthFunc( GL_LESS );

aistee
04-20-2009, 05:53 AM
Thank very much Dark Photon :)

I've tried some options with depth, but havent been able to accomplish ... with you're help it,s working just excellent :)

I have to read more about depth :)


thx and have a nice day :)