iphone Programming Glossary: gltexcoord2f
split the image into a mesh of small quadrangles in OpenGLES http://stackoverflow.com/questions/15701125/split-the-image-into-a-mesh-of-small-quadrangles-in-opengles into any quadrangles you want. You can get any quadrangle from your image by telling OpenGL about image coordinates glTexCoord2f x y I forgot to mention that image in OpenGL is loaded with size 1.f 1.f and it doesn't matter what size your picture is..
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 texture_x 0 texture_y 0 float x 0 y 0 glBindTexture GL_TEXTURE_2D mask_texture glDisable GL_BLEND glBegin GL_QUADS glTexCoord2f texture_x texture_y glVertex2f x y glTexCoord2f texture_x 1.0 texture_y glVertex2f x 512.0 y glTexCoord2f texture_x 1.0.. GL_TEXTURE_2D mask_texture glDisable GL_BLEND glBegin GL_QUADS glTexCoord2f texture_x texture_y glVertex2f x y glTexCoord2f texture_x 1.0 texture_y glVertex2f x 512.0 y glTexCoord2f texture_x 1.0 texture_y 1.0 glVertex2f x 512.0 y 512.0 glTexCoord2f.. GL_QUADS glTexCoord2f texture_x texture_y glVertex2f x y glTexCoord2f texture_x 1.0 texture_y glVertex2f x 512.0 y glTexCoord2f texture_x 1.0 texture_y 1.0 glVertex2f x 512.0 y 512.0 glTexCoord2f texture_x texture_y 1.0 glVertex2f x y 512.0 glEnd glBindTexture..
|