Cannot work with framebuffers
MikaelStalvik opened this issue · 2 comments
I have some basic code up and running that using a shader to render to a quad.
I'm trying to render this quad to a framebuffer and then render it to screen using another shader that will do post processing.
My framebuffers are properly set up with no errors (status = framebufferComplete) but as soon as I'm trying to use them my screen just gets black.
Even if I'm not using frame buffers and just do the following call before I do my render, the screen will get black:
GL.BindFramebuffer(FramebufferTarget.Framebuffer, 0);
The same code executes well in C++ using GLFW.
The GLWpfControl uses DirectX introp which for now requires the control to render to a framebuffer. So setting the current framebuffer to 0 means you are rendering to the backbuffer which isn't the framebuffer that is displayed in the control. What you are looking for is GLWpfControl.Framebuffer
.
GL.BindFramebuffer(FramebufferTarget.Framebuffer, 0);
should be GL.BindFramebuffer(FramebufferTarget.Framebuffer, control.Framebuffer);
when using GLWpfControl.
Great, thanks!
That worked just perfect! Verified working!