• Advertisement

Archived

This topic is now archived and is closed to further replies.

line of sight problems?

This topic is 6032 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.


Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement