Hi All,
I’m building an application where i’ve rendered various geometries. after rendering geometric objects i’m also trying to put names on them. i’m creating and loading the textures in different file b’coz i’m using freetype for rendering text.
But after drawing the text all the geometric objects gets transparent each time with different Alpha values. I’m using two channel alpha values for drawing the textures.
//loading textures
glTexImage2D( GL_TEXTURE_2D, 0, GL_ALPHA8, width_gl, height_gl, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, expanded_data );
//setting the properties
glBindTexture(GL_TEXTURE_2D,textures[i]);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
Where i’m going wrong???
please correct me. Thanks