1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
glBlendFunc(GL_DST_COLOR,GL_ZERO); // Blend Screen Color With Zero (Black)
glBindTexture(GL_TEXTURE_2D, menu[0]); // Select The Second Mask Texture
glBegin(GL_QUADS); // Start Drawing A Textured Quad
glTexCoord2f(0.0f, 1.0f); glVertex2i(128, 128); // Bottom Right
glTexCoord2f(1.0f, 1.0f); glVertex2i(0, 128); // Bottom Left
glTexCoord2f(1.0f, 0.0f); glVertex2i(0, 0); // Top Left
glTexCoord2f(0.0f, 0.0f); glVertex2i(128, 0); // Top Right
glEnd(); // Done Drawing The Quad
glBlendFunc(GL_ONE, GL_ONE); // Copy Image 2 Color To The Screen
glBindTexture(GL_TEXTURE_2D, menu[1]); // Select The Second Image Texture
glBegin(GL_QUADS); // Start Drawing A Textured Quad
glTexCoord2f(1.0f, 0.0f); glVertex2i(128, 128); // Bottom Right
glTexCoord2f(0.0f, 0.0f); glVertex2i(0, 128); // Bottom Left
glTexCoord2f(0.0f, 1.0f); glVertex2i(0, 0); // Top Left
glTexCoord2f(1.0f, 1.0f); glVertex2i(128, 0); // Top Right
glEnd(); |