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
[Request] Add framebuffer back to the BGL wrapper #536
Comments
Yeah, and speed up for glReadPixels |
@HG1-Public, hrm, i could not find the commit hash in the latest blender/master... |
Somebody has deleted the branch so the patch is not available any more. But I found a backup on Google http://bf-blender-cvs.blender.narkive.com/45UvaV0h/d3a1b46-framebuffer-bgl-gl-3-0-methods-framebuffer-related. I updated the path for the UPBGE. @solhrdulik69 you can't speed up glReadPixels it self. The only way is to use a PBO to speed up the reading. |
Could you test again in master ? |
I can't test every function call. I modified my sound shader example (glBindFramebuffer) and works fine. I also tested it with my FBO example https://blenderartists.org/forum/showthread.php?396018-FBO-hack-using-OpenGL-Wrapper-with-deferred-rendering-shader. Tested: |
Could you debug with apitrace or at least send a trace please ? |
The Api trace is not very use full here. The shortest call trace that I was to produce is 22 MB big https://www.dropbox.com/s/sl701v4h9xeu0b3/Framebuffer1.2.blend?dl=0. I am pretty sure that the black screen is no BGL related issue.
|
Ups. Wrong link. This was my test file (G-Buffer test).
No. The final image should look like as the screenshot in https://blenderartists.org/forum/showthread.php?396018-FBO-hack-using-OpenGL-Wrapper-with-deferred-rendering-shader. |
The framebuffer calls are working. The issues are caused by the changes in the UPBGE (render timing and viewport).
|
@HG1-Public : As i understand you want to bind a framebuffer to get the scene rendered to it ? If this is the case it should never works because we bind a FBO internally for rendering. |
Yes that is what this example will do.
I don't need to get this example working in UPBGE. I only used this example to test that the new API is working correct. |
Can i close this issue if all back to normal ? |
Yes. Can be closed. |
Dalai Felinto has added framebuffer to the BGL wrapper. But after the has fished his offscreen patch he has removed it from the BGL wrapper.
I need it back, because I need more control over the frame buffer (eg. glReadPixels).
Basically I need to bind the buffer with glBindFramebuffer.
commit d3a1b465ba61f0577dec2615e332a686ec3032fb
revert commit 18d5ac5b55cba40835a9b513347b87f658d9bad5
It would be also useful, if there would be attribute which would return the actual framebuffer ID.
Actually I use GL_READ_FRAMEBUFFER_BINDING to get the actual framebuffer ID. Which is not 100% save if you use multiple framebuffer.
readFboId = Buffer(GL_INT, 1)
glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING, readFboId) # for backwards compatibility, GL_FRAMEBUFFER_BINDING is equivalent to GL_DRAW_FRAMEBUFFER_BINDING
The text was updated successfully, but these errors were encountered: