View Full Version : Texture mapping in a mesh

Aravind S
11-24-2016, 12:03 AM
Im a beginner in openGL and i started learning rendering shapes .I rendered a basic Square with 16 vertices and along with indices using GL_ARRAY_ELEMENT_BUFFER and i have done a texture mapping of a image in that square. Now my question is how to render that image in a small mesh of that square(in the sense it has 18 triangles and 9 small squares in it .Each square is considered to be a mesh). I need to map my complete image in the center mesh.How to give the texture coordinates so that remaining mesh are not affected by the image data ..Only the center mesh has to be updated with image data.