I frequently delete textures(VBOs as well) and create new ones during my program's lifetime.
I have yet to run into any performance issues due to the nature of my program, however I'm interested in avoiding memory fragmentation(Just because!), naturally someone will say "The driver determines where in video memory things go.", well that's all nice however I still want to know if there is any way from my program that I can influence memory fragmentation when I'm constantly creating and deleting textures and VBOs.
Assume there is no alternative to creating and deleting textures frequently.
The issue isn't about how I can do things differently, but how to control fragmentation.
I assume that with the new OpenGL 3.0 object model I will have a pointer that is mapped(I wish I could have a pointer directly from SRAM to VRAM ) to a part of video memory?
Under the new object model, I assume there would be nothing technical stopping me from merging and reusing the pointers to accommodate new data?
I have yet to run into any performance issues due to the nature of my program, however I'm interested in avoiding memory fragmentation(Just because!), naturally someone will say "The driver determines where in video memory things go.", well that's all nice however I still want to know if there is any way from my program that I can influence memory fragmentation when I'm constantly creating and deleting textures and VBOs.
Assume there is no alternative to creating and deleting textures frequently.
The issue isn't about how I can do things differently, but how to control fragmentation.
I assume that with the new OpenGL 3.0 object model I will have a pointer that is mapped(I wish I could have a pointer directly from SRAM to VRAM ) to a part of video memory?
Under the new object model, I assume there would be nothing technical stopping me from merging and reusing the pointers to accommodate new data?
Code:
struct ObjectPointers{
ObjectPointers *next;
GLvoid *ptr;
}
ObjectPointers a, b;
ObjectPointers newObj;
newObj.next = &a;
newObj.next.next = &b; //done this way for clarity