I am using a power of two sized texture (128x128) and I am drawing small portions of it onto polygons (using it as a texture atlas). I have set the following:
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_NEAREST);
However the result is a texture that is still blurred together. It looks like it's using GL_LINEAR instead.
Any ideas why the texture would still be coming out blurry instead of pixelated?
Here is an example:
The letter F is a portion of the image. Here it is drawn using a 128px image, 256px, 512px, and 1024px. As you can see it gets better, but even at 1024px it still blends the edges a little. I should be able to use a 128px image and scale it up using GL_NEAREST and have it have clear edges. What could be causing it to draw like this?
EDIT
I have updated the app to use GLES20 and am still having the issue. I have tried using the following after binding the texture and before the call to drawArrays just to make sure I was using GL_NEAREST:
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_NEAREST);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_NEAREST);
EDIT 2
The problem happens even without using an atlas. I put an 8px by 8px png on a quad and it was a blurry mess. Would there be some reason OpenGL ES 2.0 is not using GL_NEAREST?
Here is the result: