PDA

View Full Version : Transparent 3d Text mapped onto a polygon



bigefrom84
11-08-2013, 06:39 AM
I am writing a routine to display finite element information. When drawing the FE model, i want to identify the individual element by number. So i want to place a number on each face of the element (consider it a cube). I also want to color this face. Can i use 1d textures to map the number onto the face of the polygon? What about coloring the background of the texture?

I have seen examples where they map a texture onto a cube, but i want my texture to be transparent except for the text.

Sorry if this is a little unclear, but i am not up on the latest OpenGL

Ehsan Kamrani
11-12-2013, 11:41 AM
you can use alpha channel for your 2D texture to mask specific parts of texture. Then use discard method in GLSL or simple alpha blending to render the textures.