the purpose here is to write some code that will directly render an OpenGL scene into a preallocated memory somewhere in my RAM.
Actually, I do a kind of :
Byte MyBuffer[512*512]; DrawScene(); glReadPixels(MyBuffer);
What I actually expect to do is :
Byte MyBuffer[512*512]; DrawScene(MyBuffer);
I was told that FBO could be the solution, but wasn’t able to find out how to render directly to memory instead of an OpenGL texture.
Also, since I own an old Video Card that doesnt support FBO extension, I am only trying to understand how I can manage to do so before I decide whether I buy a new video Card or not.
Then, here are my few questions :
Can FBO render directly to a memory buffer (and not to some buffer on the video card)
I saw a few other methods there that sound like they also offer a way to do such. But since it’s an old post (1997), I suppose that from that time technics have evolved. Do you then know if some of them managed to meet developers expectations or do you know some other technics that I could use there?
If I decide to use GPU features (eg CUDA programming) to render faster some OpenGL scene, but then want to copy it into memory, will I encounter a serious performance downgrade because of the memory bus speed? Is this something quite usual and do you know some tutoriels about doing such?
Ultimately, since my main goal is to go from DrawScene()" to some memory target as quickly as possible : is Rendering to Memory a real upgrade in performances, or is the current way (Draw + glReadPixel) the best and fastest way?
And what I think is the most tricky of my questions : assumed it is possible to render directly into memory, could I also consider rendering directly to some opened stream (like some network pipe or stdout)?