I’m trying to implement a skydome by drawing a sphere and with auto texture generation enabled. I set the texture generation mode to sphere mapping. It looks working but it does not rotate with the scene, so it’s static. Is this method conceptually correct? How can I make the skydome looks moving/rotating with scene?


the skydome is a model which you can manipulate in any ways with matrices. if instead you want to rotate the texture itself on the model you can do that with matrices as well.

// Textures:

// Models:

Well yeah but when sphere mapping is enabled, then it’s not affected by the way the model is transformed. Can only rotate the texture, but what matrix to use? the inverse of modelview rotation?

what sort of effect are you trying to achieve with your skydomes?
Some folks just use cubemaps, btw… trade your hemisphere in for a hemicube.

modus: … trade your hemisphere in for a hemicube.

yes or a pyramid. hemicubes aka skyboxes are very common and require less vertices.

true, depends on how much headroom you need. For my pointy head, a pyramid is actually a good fit.

If you use shaders, you can implement your sphere map tex gen in the vertex program and use a texture matrix style transform to align the texture.

Probably better would be to just get a hemisphere out of a modeling package and use it. If you are using auxSolidSphere, there’s no accounting for performance.

I use glu quadrics…the other half is ignored since I’m overwriting it by the ground texture.