Jump to content
  • Advertisement
Sign in to follow this  
mohanp

Blending and Rotation

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

Hi, I am able to successfully inscribe a letter on the face of my Cube. Texts are Alpha textures and i blend them on to the face of a cube (where i have mapped another texture with RGB component). The problem is that once the cube starts rotating, it just does not work. I want to inscribe text on the faces of a cube and the spin it. The letters may be dynamic and hence i want to create the textures for them dynamically instead of static images. Is this possible ? thanks mohan

Share this post


Link to post
Share on other sites
Advertisement
Are you using multi-texturing to blend both textures on the same face, or are you drawing two faces and using glBlend() to blend them?

In the second case, make sure that you are drawing both faces with exactly the same rotation, and consider switching to the first method.

Share this post


Link to post
Share on other sites
I am not using multi-texturing. I draw the face with texture mapping and then blend the text. The text does not seem to be blended to the face but directly to the screen. So, once drawn it exists separately on the screen and cube rotating on its own ? How do i blend it to the face ?

-thanks
mohan

Share this post


Link to post
Share on other sites
Ah! multi-texturing worked like a charm. I never thought that these things would work the first time.

Thanks so much.
mohan

Share this post


Link to post
Share on other sites
Hi,

I just realised that i have enabled both multi-texture and blend (GL_SRC_ALPHA and GL_ONE_MINUS_SRC_ALPHA). As my text is just Alpha texture, i have to enable blending also ?

thanks
mohan

Share this post


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

  • 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!