probably someone other had posted this hint… i’ll do it too.
DX has the ability to return a pointer to the texture pixels: you can modify them directly.
OpenGL instead not, because textures here were designed to be black-boxes: initialize and use them.
it would be VERY good if some opengl new functions would be designed to allow a low level access to the texture memory.
OpenGL caches textures into system ram and video ram, and if it would be possible to change directly the pixels… hmmm…
maybe some new kind of texture object target could be designed: instead of GL_TEXTURE_2D a GL_TEXTURE_MEMORY_2D.
this could create a texture like the one we all know, but instead of cache them, we tell OpenGL to put them into video ram (or agp ram) and leave them there.
this kind of texture is a sort of “absolute priority” proxy scheme, wich will be considered differently from other texture objects.
the location into memory of the texture pixels then could be obtained with a glGetMemoryPointer()-like function, (that would became a new function entry) wich should behave differently (but always return valid pointers) on any platforms.
could it be possible? what do you think guys?
Dolo//\ightY