Apple client storage?

Member
Posts: 67
Joined: 2006.07
Post: #1
I understand that using GL_UNPACK_CLIENT_STORAGE_APPLE is supposed to eliminate the need for OpenGL to keep an internal copy of texture data, but how much optimization does that really give? With it turned on, I've been having some headaches with either memory leaks or somehow losing the pointer to the allocated memory (getting "pointer being freed was not allocated" errors when trying to free the texture data). With it off, I've just freed the data after loading the texture, which seems to work fine. Is it really worth it to use the Apple client storage extension?

Since when was "Fred" a placeholder variable?
Quote this message in a reply
Sage
Posts: 1,232
Joined: 2002.10
Post: #2
In essence, using this extension can eliminate a memcpy every time you touch a texture.

If your app touches textures a lot (like streaming video) then this is pretty critical.

If your app creates static textures once on startup, then it's not critical, but still good. Immediately freeing your copy of the texture is best if you don't use this extension, but there are still two copies resident in system memory until you delete. Generally that's fine, but if you're manipulating a dozen HDTV-sized textures, maybe not.

In summary, using less memory is always good. Skipping operations is always good.

The TextureRange sample lets you toggle client storage (and other parameters) to compare performance.
Quote this message in a reply
Member
Posts: 67
Joined: 2006.07
Post: #3
Thanks for the info. It seems like my app, a 2D game using static textures for sprite frames, doesn't really benefit that much from it -- most of the performance boost seems to come from the Texture Range extension. Plus, I never use glTexSubImage2D() in my code, so client storage doesn't seem like it would have much of an effect.

However, I have another question, just for future reference. If I recall correctly, I think Quartz Extreme double buffers windows automatically or something like that. Would the client storage extension have different effects in windowed and full screen mode?

Since when was "Fred" a placeholder variable?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
No, it has nothing to do with either the window server or double buffering.
Quote this message in a reply
Member
Posts: 67
Joined: 2006.07
Post: #5
Alright, thank you very much!

Since when was "Fred" a placeholder variable?
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenGL graphical data storage order question. WhatMeWorry 3 3,513 May 4, 2007 12:13 PM
Last Post: tigakub