another question on texture storage...

Forgive my ignorance, but I have made some assumptions which I’d like someone to confirm (or not!).

I’ve established that OGL keeps textures in system memory, and copies them to video memory on demand. So assuming all textures fit into video RAM, and assuming both (system & video RAM) have the same storage requirements (32 bit RGBA for example) it’s safe to assume that the memory required to store said textures is twice as much as necessary(one copy in system RAM and another in video RAM).

Here is where I’m confused. If I alter a texture using RTT am I correct in thinking that the driver is esentially ‘blind’ to this. In other words the texture in video RAM is no longer reflected in system RAM, hence the need for an expensive readpixels? If this is the case, and the altered texture ceases to be resident, does the driver copy the altered texture into system RAM for when it’s next needed, or does the driver just re-use the original (unaltered) texture?

I know this doesn’t really belong in the advanced forum, but I have another related question after the above is clarified.

Many thanks
Mark

Drivers might implement this differently, but correct behavior would be that the driver copies the content of the texture back into sys-mem when it is removed from video-memory. Anything else would result in “undefined behavior”.

I actually don’t know to what extend current drivers stick to this. But i would assume that they use a policy which removes rendered-to textures as late as possible to prevent having to copy the content back to sys-mem. I would even think that some drivers don’t care about making a backup since rendered-to textures are usually updated frequently.

Currently this is a bad situation, but OpenGL 3 will have mechanisms to tell the driver what should happen in such situations.

Hope that helps
Jan.

Thanks Jan.

How does one go about requesting a new extension to OpenGL? Post an idea in this forum?

There is a dedicated forum for OpenGL suggestions. Though, in my opinion it’s better to post in the advanced forum, since the other forum is very seldom visited by most users.

However suggesting extensions for OpenGL 2 that “only” improve such usability and do not introduce any real new idea is pointless, since the ARB is working hard on bringing us a completely new and shiny OpenGL 3, which will solve most (if not all) such issues.

However you can of course just post what you are thinking about and people will tell you whether it is a good new idea or whether it is nothing new (or if there is a work-around that you could already use today).

Jan.