LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Matthew Jones on September 10, 2005, 22:25:25

Title: SkyBox rendering problem
Post by: Matthew Jones on September 10, 2005, 22:25:25
We have small rendering engine going. The scene geometry loads with the textures for diffuse and a seperate texture for the lightmaps. Those work great.

We went and added a skybox to the level and we are having a problem with the textures from the sky box getting dark. If we turn off the Lightmaps on our scene geometry then the problem goes away. SO we figure something is bleeding over. We have disabled just about everything we can think yet the problem remanes.

I'll post the code if I need to but I was hoping maybe someone would know what we were doing wrong or had some ideas. I hate to ask people to read our code  :oops:.

I Appriciate any help
Matt
Title: hmmmmmm...
Post by: Fool Running on September 12, 2005, 14:37:14
If your skybox only has one texture, you might make sure you are disabling the 2nd texture when rendering the skybox (other than that I have no idea without code  :wink: ).
You say you tried disabling "everything we can think of." Could you list what you tried so we don't repeat it?  :lol:
Title: SkyBox rendering problem
Post by: Optus on September 12, 2005, 21:08:58
Sounds like you just need to disable the lightmap's texture unit before drawing the skybox.  I'm assuming your diffuse texture is in unit 0, and your lightmaps are in unit 1.
Before skybox rendering:
ARBMultitexture.glClientActiveTextureARB(ARBMultitexture.GL_TEXTURE1_ARB);
GL11.glDisable(GL11.GL_TEXTURE_2D);

Then to re-enable that texture unit for next rendering cycle (after skybox rendering):
ARBMultitexture.glClientActiveTextureARB(ARBMultitexture.GL_TEXTURE1_ARB);
GL11.glEnable(GL11.GL_TEXTURE_2D);
Title: SkyBox rendering problem
Post by: Matthew Jones on September 13, 2005, 00:09:38
Ya that would thing we didn't try. LOL   :D  In fact we're so new to OpenGL we didn't know that one was in the list.

Thanks guys
Matt