PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

iPhone OpenGL UploadTexture strange behavior.

tinybulb.com · 14 Jan 2009, 12:17 UTC
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.
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.
tinybulb.com · 14 Jan 2009, 15:08 UTC
Thanks again :)