Jump to content
  • Advertisement


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


Water Reflections

This topic is 5411 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

Hiya, Sorry for making a new post - this coulda bolted on to one of the older postings about water reflections but I felt this was a different aspect of the topic to be approaching. I''m doing water reflections by rendering using the stencil buffer and clip planes to a texture and then performing the necessary texture matrix transformations to project the texture onto the water plane. I''ve generated my texture, and I''m applying the correct transformations to the texture matrix. However, it seems that everyone just draws their objects and the texture is projected correctly. If i do this i just get a mess for a projected texture. I''ve looked at loads of different examples on the net, and the most complete seemed to be the SGI Advanced ''97 example on projective texturing : http://www.sgi.com/software/opengl/advanced97/programs/projtex.c Thing is, in there, they''re doing everything that people have described on these forums and everywhere else, but instead of just rendering the objects, they encapsulate the rendering within glEnable(GL_TEXTURE_GEN_S); .. glEnable(GL_TEXTURE_GEN_Q); // RENDER STUFF glDisable(GL_TEXTURE_GEN_S); .. glDisable(GL_TEXTURE_GEN_Q); as far as i can make out, that makes sense, so I''m using that and it works perfectly. http://www.dami.org.uk/kandi2004.jpg is how it looks The problem now is i can''t jitter the texture co-ordinates since GL appears to have taken complete control of the texture rendering, or at least I''m not doing it right to get them jittered. Is this right that I''m having to enable the GL_TEXTURE_GEN_* or have I done something wrong earlier? Thanks loads for your help

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!