Page 1 of 1

iPhone OpenGL UploadTexture strange behavior.

PostPosted: Jan 14, 2009 @ 1:17pm
by tinybulb.com
As in your samples I am do UploadTextures on DisplayInit. During the rendering i am doing a lot of rotations of objects etc, so i am using glTexParameteri, GL_LINEAR for E2DSurfaceRGBA to achieve correct antialised image. In case if all objects use the same texture everything is fine, but in case if i am using different textures for different objects glTexParameteri applied only to the last uploaded texture and ignores all others. As result all objects are not antialised exclude the one for which texture were uploaded at the end of resource init.

Uploading of textures on every frame cause application works slow and totally incorrect, so as i see it is incorrcet solution.

Is there any workaround for this?

PS During the applicaion run no erros were returned by glGetError.

PostPosted: Jan 14, 2009 @ 2:48pm
by edge
Hi,

The texture setting is stored per texture. To set all of them to linear, you can call glTexParameter for each texture after uploading it to OpenGL. You don't need to do this multiple times, because OpenGL remembers it per texture.

PostPosted: Jan 14, 2009 @ 4:08pm
by tinybulb.com
Thanks again :)