Blending and Rotation

Started by
3 comments, last by mohanp 15 years, 4 months ago
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
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.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

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
Ah! multi-texturing worked like a charm. I never thought that these things would work the first time.

Thanks so much.
mohan
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

This topic is closed to new replies.

Advertisement