line of sight problems?

Started by
2 comments, last by masterg 22 years, 9 months ago
Hello, I have been working on a terrain engine for a little over a week, I have water, nice island, particle engine, and now I am implementing a sky. I have the code working fine, but the sky is not viewable unless the user is positioned above it. That (eh kinda) wont work for me, because the user needs to see the sky with the terrain and water. I cant remember or figure out how to make it so the sky is viewable when you are located beneath it. Currently, I have just one layer with a sky texture applied to it a simple textured quad Please if anybody can help me with this problem, I would be very greatful , thankyou very much to anyone who can help
masterghttp:/masterg.andyc.org
Advertisement
it seems that u have GL_CULL_FACE enabled. You have to take care, in which order you are going to draw your quad. you can solve your problem in two ways:

the one way is, just disable GL_CULL_FACE before you are rendering the sky, and then enable it again.
(glDisable(GL_CULL_FACE); glEnable(GL_CULL_FACE)

another way is, to draw your quad in the correct order. if you have GL_CULL_FACE enabled (it seems so) you have to draw your triangles/quads in the current order. by default it is counter-clock wise.

i would suggest, you are going to use the first method. i think the player should see the sky, no matter if he is beneath or above the sky.

i hope this helped.


. . . : : thnx in advance : : . . .
Thankyou very much, I remember reading about that once, knowing it had to deal with my winding, but I wasnt sure what to change. Thanks again
masterghttp:/masterg.andyc.org
No problem

You are welcome !



Homepage
. . . : : thnx in advance : : . . .

This topic is closed to new replies.

Advertisement