Original Post
๐ Locked
Textures
Advertisement
glEnable(GL_BLEND);glBlendFunc(src_factor, dst_factor);dst_pixel_color = src_factor*src_color + dst_factor*dst_color
some factors = GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_DST_COLOR,
GL_ONE_MINUS_DST_COLOR, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA,
GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA
so to blend two textured polygons...
glDisable(GL_DEPTH_TEST); //disable the depth test
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ZERO);
--draw first triangle
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
--draw second triangle
glEnable(GL_DEPTH_TEST); //disable the depth test
glDisable(GL_BLEND);
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement