iphone Programming Glossary: color_texture
How can I crop an Image with mask and combine it with another image (background) on iPhone? (OpenGL ES 1.1 is preferred) http://stackoverflow.com/questions/5299452/how-can-i-crop-an-image-with-mask-and-combine-it-with-another-image-background call is where the most interesting part is. renderTextures draws the sample textures in the top row. static GLuint color_texture static GLuint mask_texture static GLuint background_texture static float window_size 2 void renderMask float texture_x 0.. glVertex2f x 512.0 y 512.0 glTexCoord2f texture_x texture_y 1.0 glVertex2f x y 512.0 glEnd glBindTexture GL_TEXTURE_2D color_texture glEnable GL_BLEND glBlendFunc GL_DST_COLOR GL_ZERO glBegin GL_QUADS glTexCoord2f texture_x texture_y glVertex2f x y glTexCoord2f.. glVertex2f x size y size glTexCoord2f texture_x texture_y 1.0 glVertex2f x y size glEnd glBindTexture GL_TEXTURE_2D color_texture x size 16 glBegin GL_QUADS glTexCoord2f texture_x texture_y glVertex2f x y glTexCoord2f texture_x 1.0 texture_y glVertex2f..
|