-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get the actual framebuffer content? #138
Comments
scientific experiments? woah. anyway, if you want to get the pixel values into main memory for something like a screenshot i think what should work is camera->frameBuffer->toImage(). locking that raster should read out the pixels similar to how you tried to do it. but i'm not entirely sure i understand what you want to do, reading the pixel values to main memory may not be the right solution. perhaps the subrast example is more like what you need? |
Thank you for the quick reply @aap. Imagine my problem as producing a VR-like side-by-side views and some post-process. So what I need is:
I tried to start with the second point by trying to get the framebuffer to a texture and render in a new draw call on a fullscreen quad. I don't need it in the main memory, just desperately tried the simplest solution. The optimal solution for me would be to render everything into different parts of an off-screen framebuffer and then project it on a fullscreen quad. EDIT: |
Hi @aap. Thanks for this library! I use it for some scientific experiments and I am struggling getting the content of a framebuffer. Would you please explain to me how your pipeline works? I have tried off-screen rendering where I bound a new framebuffer instead of the default one at all places where
glDraw...
is used. Having issues with that, I tried to go to the very end of the drawing and did this simple thing inglDevice.cpp
inshowRaster
function:I tried to render the texture but it does not contain the same content as I would see in the game. Please would you kindly tell me how to obtain the image as it is viewed when the game plays?
I am trying to render the scene in several views, similarly to VR mods. My plan is to add a loop somewhere around the
glDraw
commands, edit the matrices and render only to a portion of the framebuffer. Or maybe an easier solution would be to force the engine to render everything several times and call theshowRaster
only once at the end while storing the framebuffer in each iteration (would be again related to the issue above)? Then I need to do something with the views as described above. Any suggestions regarding my approach are welcomed.Thank you!
The text was updated successfully, but these errors were encountered: