JOGL multi-texturing

newb question:
I’d like to have multiple layers of textures on my terrain. What would be the best way to do this? Is there any other way than blending?

And about blending: I render my first texture with depth testing enabled, and depth buffer writes enabled. For the second texture, I disable depth buffer writes, but what do I do with depth testing? If I enable it, wil the new texture be displayed nicely on top of the first, even if the depth coordinate is exactly the same as the first texture? Do I need some kind of offset ?

I’m not quite ready to learn GLSL, or something. I’ll be very happy if I get this OpenGL 1.0 thing straight … :slight_smile:

This should help:
http://www.opengl.org/resources/code/samples/sig99/advanced99/notes/node60.html

Please note that the above is OpenGL 1.3 and up. Why OpenGL 1.0 anyway?

Uh, GL 1.0 doesn’t even have texture objects. Are you sure thats what you’re actually targeting/using?

Btw, a depth tests of LEQUAL (less-or-equal) should be fine for multiple passes, as they should have identical depth values. Also, be careful with the blending - you can’t blend the first pass or you’ll usually get the clear colour leaking though. Usually the first pass is done without blending and the others blended on top.

@both: No, I’m not sure I want to use OpenGL 1.0, I’m just saying I don’t like my multi-texturing too advanced, that’s all :slight_smile:

@Orangy: I forgot about setting the depth-test to LEQUAL. That’ll do the trick, thanks!

@ericd: Thanks for the reference, I’ll check it out tonight!