A OpenGL App I've written acts as a viewer for large data files in a propriety format.
It's pretty simple, it loops through each data set one at a time, drawing each one using a glCallList:
for (all objects in our in our data set)
{
if (first time drawing this object)
{
glNewList(...);
for (all pixels in object_memory)
{
drawpixel();
}
glEndList();
glCallList(...);
delete object_memory
}
else
{
glCallList(...);
}
}
I'm trying to add a feature where I can change the transparency of an individual glCallList. The problem is, the data files are so big that I generate the glCallList and then have to delete the actual data I read from. This brings the memory usage down from 4GB to around 400MB. The use of glCallLists are pretty vital to the speed of the application also, without them it slows to a crawl.
Is there a way I can modify the global transparency of the current matrix before I actually call the list?
Updating the list each time the alpha value needs to be updated isn't an option.
Alternatively is there another method that has the same performance benefits of CallLists but can be updated easily?
I've read about VBO's (Vertex Buffer Objects) before and they sound similar but i'm not sure if my data fit's there application domain correctly.
Any thoughts or opinions would be really appriciated.
Thanks,
~ Brian