Both 320 and 200 aren't powers of two. Your maybe confusing it with
being divisible by two. Power of 2 textures are 1, 2, 4, 8, 16, 32, 64,
128, 256, 512 etc
This could be the problem but since I never use non-power-of-two
textures I can't be 100% sure. Unless you have a REALLY compelling
reason to use them I wouldn't. As a test I would just resize/stretch
the image to 512x256 and verify whether this is the problem. If it is
then research non-power-of-two textures on OpenGL. You likely need to
check an extension.
On 24/12/2011 4:46 AM, AndroidYourself wrote:
Thanks for the replys
Yes, I use RGB 565 and my first Texture is: 512x512
bitmap =
BitmapFactory.decodeStream( getAssets().open("icon_512.png") );
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0);
This is showing nice ... but then the Bitmap in the
"canvasBufferAsShort" Buffer (320x200) is not shown with:
gl.glTexImage2D(GL10.GL_TEXTURE_2D, 0, GL10.GL_RGB,
bufferWidth,bufferHeight, 0, GL10.GL_RGB, GL10.GL_UNSIGNED_BYTE,
null);
gl.glTexSubImage2D(GL10.GL_TEXTURE_2D, 0, 0, 0, bufferWidth,
bufferHeight, GL10.GL_RGB, GL10.GL_UNSIGNED_SHORT_5_6_5,
canvasBufferAsShort);
and Im getting glGetError = 1281
Is 320x200 not a power of 2? Or is there another point of the Power VR
Chip of my Galaxy Nexus I must handle?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en