I’m trying to resize an image (using glTexCoord2f), and then enlarging it (using glVertex2f) except I’m having a problem.
If I were to enlarge the image without drawing a certain part, it would stretch out however far I want it. When I draw a certain part of an image I’ll see the certain part I like to draw. When combining these two methods in one… I don’t really get far :(.
glBegin(GL_TRIANGLE_STRIP);
glTexCoord2f(pStartX / (float)fullwidth, pStartY/(float)fullheight);
glVertex2f(pX, pY);
glTexCoord2f((pStartX+pWidth)/(float)fullwidth, pStartY/(float)fullheight);
glVertex2f(pX + pWidth, pY);
glTexCoord2f(pStartX/(float)fullwidth, (pHeight + pStartY)/(float)fullheight);
glVertex2f(pX, pY + pHeight);
glTexCoord2f((pStartX+pWidth)/(float)fullwidth, ((pHeight + pStartY)/(float)fullheight));
glVertex2f(pX + pWidth, pY + pHeight);
glEnd();