Hi.
I am creating some planets. I am using some images of our dear planet as textures, and using gluSphere to render the planet. However, the result is a "reversed" earth. Not vertically, so that the north pole is the south pole and vice versa. Rather, it's flipped horisontally, so that the earth appears "backwards" for lack of a better word. Now, my other textures (stars & background, - simple textured quads) work as they should. It is only a problem (at least so far), when using gluSphere.
I am not doing anything really special, so I am hoping someone has witnessed this before, and know what I am doing wrong?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| gl.glPushMatrix(); gl.glTranslatef(xpos, ypos, -1); gl.glRotatef(45.0f, 0.0f, 1.0f, 0.0f); gl.glRotatef(20.0f, 1.0f, 0.0f, 0.0f); gl.glTranslatef(orbitRadius, 0.0f, 0.0f); gl.glRotatef(-90.0f, 1.0f, 0.0f, 0.0f); gl.glRotated(-rotationAngle, 0.0f, 0.0f, 1.0f); planetTextures.get(textureRef).bind(); glu.gluSphere(gluq, planetRadius, planetDetailLevel, planetDetailLevel); gl.glPopMatrix(); rotationAngle += rotationSpeed; |