I'm trying to pre-process display lists (in OpenGL) and save to memory to help loading time as an exercise for when I develop for handhelds. How do I serialize the contents of a generated list?
Also, does anybody know a good DirectX/OpenGL wrapper?
Name:
Anonymous2007-08-10 22:16 ID:9zDsFoVI
SDL
Name:
Anonymous2007-08-10 22:17 ID:A1J7P1Gx
printf("computer, please serialize the contents of a generated list for me)"
>>5
OP here. I was under the impression that display lists hold a sequence of primitive draw instructions, and that by pre-processing them before they're actually used, you could save quite a bit of computation time. For instance, if your draw procedure required many trig computations, you could sort of ``pre-compute'' all of the nasty calculations, then at runtime, ``call'' your display list.
Is my interpretation correct?
I'm also under the impression that it's possible to serialise the actual display list to persistant storage, so I can reload it at a later time. Is this possible?
Some graphics hardware may store display lists in dedicated memory or may store the data in an optimised form that is more compatible with the graphics hardware or software.
This implies that the data of display lists is in some implementation-dependent form. Since the OpenGL API is at its heart an interface, I don't think they'd let you do something that would so blatantly expose underlying details like that.
>>8
Ah, I see. Is there anyway to do what I want, then? Or is my only option to do the display list initialization every time my software begins?
Name:
Anonymous2007-08-11 2:53 ID:Xwjo2Niy
I've never heard of anything like this being done with display lists either. Certainly not with older versions of the OpenGL API was there anything like this.
However, times are a-changin'. With vertex and geometry shaders, I'd wouldn't be surprised if there was a way to extract all the transformed geometry in some manner. This, however, would probably be black magic.
Maybe take a look at glFeedbackBuffer and glBufferData with READ too.
Name:
Anonymous2007-08-11 4:32 ID:KszX3JWV
>>6 >>7 >>8
OP here, thanks for covering for my ignorance. And good guess on developing for the DS. ;)
>>10
Hmm, this sounds promising. I'll research this further; thanks for giving me a good place to start!
Name:
Anonymous2007-08-11 14:11 ID:IRUNGaGg
I LISTEN TO INFECTED MUSHROOM WHILE I WRITE JAVA BECAUSE I AM 1337