I want to draw a texture of the dimensions 200px (width) x 80px (height) to a rectangle in openGL (which is 200px wide and 80px height). As textures in openGL ES 1.1 has to be of power two I want to load an image with the dimensions of 256px x 128px that contains my original 200px x 80px image in the upper left corner, the rest is left blank. How do I use glTexSubImage2D to get that part of interest from the 256px x 128px texture? I don't know how to provide that function correctly with the last argument, which is pixels.
Furthermore, I read that I have to somehow use glPixelStorei?
Could anybody please provide my with a snippet of sample code, please? I've been working really hard to figure this out, but I just don't get it.
BTW, I also tried not to use glTexSubImage2D, but to adjust the TextureCoords between 0...1, but that didn't work eiter.