Greetings again, and thanks for the help provided so far.
I come again with some questions, this time concerning interaction between colors, lights and texturing.
I've been piling up the various tutorials at NeHe on the framework of the one in the "how to get started with jogl" in this very forum, and so far it's been fine. One problem I've found has come up when mixing textured and untextured polygons.
I made the colored pyramid and cube in the solid tutorial, and then decided to texture that same cube. At first, it would work but make the pyramid colored weird. So I thought of disabling the textures when the pyramid was being drawn and reenabling them for the cube, and it worked:
Then I did the lights and filters demo, which adds various filtered textures and, more importantly, lights, to the scene. This time, the trick of enabling and disabling hasn't been enough. If lights are on, it will look like this:
I did put some normals on the pyramid faces to get that reaction to the light (not sure if they're ok, probably wrong) otherwise it'd come out as if lights didn't touch the pyramid, but when I disable the lights, the colors appear just fine (mind that this happens because, as I said, I disable textures when drawing the pyramid and reenable them for the cube):
So, I believe there is some interaction between the textures, the lights and the colors, but I haven't been able to figure out a way to unbundle that. More importantly, I get the feeling that enable-disable isn't good programming, but then again I'm new to all this, so the answer might just be in front of my eyes and I just can't see. What do you make of it?
Thanks for your time in advance.