Are there certain format restrictions that textures need to adhere too?
I am loading TGA files and drawing them with the following fragment shader:
varying vec2 v_texCoord;
uniform sampler2D s_texture;
uniform vec4 vColor4;
void main()
{
vec4 tmpColor = texture2D( s_texture, v_texCoord );
tmpColor.r = vColor4.r;
tmpColor.g = vColor4.g;
tmpColor.b = vColor4.b;
gl_FragColor = tmpColor;
}
I find that 16x16 images display OK. 64x16 display OK. 72x16, 80x16 and 96x16 doesn't work.
I will provide more information including the TGA files if needed.
72, 80 and 96 are not powers-of-two; this requirement has little to do with data format in OpenGL ES. This requirement is actually pervasive even in modern desktop GL, where it may depend on the data format used.
Uncompressed texture data in (desktop) OpenGL 2.0 or greater can have non-power-of-two dimensions.
However, compressed texture data continues to require block sizes that are multiples of 4, pixel transfer functions continue to assume 4-byte data alignment for each row in an image, floating-point textures, if supported may also require powers of two, and so on.
Many image libraries designed for GL will actually rescale stuff to a power-of-two, which can solve every one of the problems discussed above. It's not always the most appropriate way (it can be extremely wasteful) to fix dimension problems but it can be applied universally to just about any common dimension problem.