• Advertisement
Sign in to follow this  

Please please help!

This topic is 3635 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 urgently need help with a texture shader problem. I have a 2D texture mapped on a cube and I need the texture to swirl in a circular motion by modifying the texture coordinates. Do I need to do the coding in main or in the shaders and how do I do it? Please help! Hannah

Share this post


Link to post
Share on other sites
Advertisement
Thanks

I'm not sure what to put in the rotate function though (do I put the texture coordinates in) or where to put it.
Do I put the rotate function before the drawing of the cube and is it the texture coordinates that I put in the totate function

Share this post


Link to post
Share on other sites
As a hint, heres'a how I map texture with my 2D engine to access them by pixels :

Gl.glMatrixMode(Gl.GL_TEXTURE);
Gl.glLoadIdentity();
Gl.glScalef(1.0f/texture.Size.Width, 1.0f/texture.Size.Height, 1.0f);

You can rotate, zoom it at will...

Edit : http://www.loria.fr/~roegel/cours/iut/opengl/addison.pdf, page 79

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement