I am using Core Animation to display some images.

Is there an easy way to find out the following information?

1.
Query the properties GL_MAX_TEXTURE_SIZE and GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB from the current OpenGL context that Core Animation
must have acquired somewhere.
Well, it would suffice if I could get CA's current OpenGL context.

2. Find out the dimensions of an image on the disk, *before* actually loading it into memory.

The reason is that I occasionally get an error message saying
"CoreAnimation: X by Y image is too large for GPU, ignoring".

So I'd rather like my app to not load these images in the first place.

If #1 is not easily achievable, then I guess I could hard-wire the size to 2048x2048 for the moment. It's just not elegant.

I understand there is also a CATiledLayer, but if I skip a few images it doesn't really hurt.

Best regards,
Gabriel.


Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to