PDA

View Full Version : Alpha channel with multitexture glDrawElements



mcastrillo
05-02-2005, 09:10 AM
I'm using glDrawElements to render a multitextured mesh. Each texture is RGBA format and both textures blends ok, but the result does not blend with the rest of the scene. What's wrong?

Try with a single texture in RGBA format:



GL.glActiveTextureARB( GL_TEXTURE0_ARB );
GL.glClientActiveTextureARB( GL_TEXTURE0_ARB );
GL.glEnableClientState( GL.GL_TEXTURE_COORD_ARRAY );
GL.glTexCoordPointer( 2, GL.GL_FLOAT, 0, TexureCoords[ 0 ] );
GL.glBindTexture( TextureID );

GL.glDrawElements( GLMode, VerticesIndex.Length, GL.GL_UNSIGNED_INT, VerticesIndex );thanks

dorbie
05-02-2005, 12:50 PM
Impossible to tell from this. It could be zbuffer issues but that's a wild guess.

Do you have a screenshot?

mcastrillo
05-02-2005, 01:38 PM
Originally posted by dorbie:
Impossible to tell from this. It could be zbuffer issues but that's a wild guess.

Do you have a screenshot?Exactly, it was a zbuffer issue.. I was rendering the alpha-multitextured mesh >before< the background... it was a beginner issue :p

Thanks! ;)