Added loading of a TGA mask image to generate alpha canal

This commit is contained in:
trotFunky 2019-09-25 13:02:24 +02:00
parent 5e6b953822
commit db0bd97580
5 changed files with 48 additions and 7 deletions

View file

@ -62,6 +62,8 @@ void display_rotating_pyramid(float x, float y, float z, float c, float h, float
void display_tree(float x, float y, float z, float h, float w, const Texture& tree_texture)
{
glEnable(GL_ALPHA_TEST);
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
glBindTexture(GL_TEXTURE_2D,tree_texture.opengl_id[0]);
@ -95,4 +97,6 @@ void display_tree(float x, float y, float z, float h, float w, const Texture& tr
glVertex3f(x,y+h,z+w/2);
glEnd();
glDisable(GL_ALPHA_TEST);
}