Re: [PATCH 1/2] wined3d: Set GL_NONE for glReadBuffer / glDrawBuffer on FBO initialization.
Seems ok, though a small comment explaining the issue this patch fixes probably wouldn't hurt. On 25 April 2013 20:43, Matteo Bruni mbr...@codeweavers.com wrote: +if (target == GL_READ_FRAMEBUFFER) +context_bind_fbo(context, GL_DRAW_FRAMEBUFFER, draw_binding ? draw_binding : 0); +else +context_bind_fbo(context, GL_READ_FRAMEBUFFER, read_binding ? read_binding : 0); I don't think using 0 here is strictly wrong, but a proper NULL would probably be clearer. As a followup, I think we can actually get rid of the glGenFramebuffers() in context_bind_fbo() these days and just pass a GLuint instead of a pointer. The only place left that actually creates FBOs should be context_apply_fbo_entry().
Re: [PATCH 1/2] wined3d: Set GL_NONE for glReadBuffer / glDrawBuffer on FBO initialization.
2013/4/25 Henri Verbeet hverb...@gmail.com: Seems ok, though a small comment explaining the issue this patch fixes probably wouldn't hurt. A comment in the commit message or in the code? On 25 April 2013 20:43, Matteo Bruni mbr...@codeweavers.com wrote: +if (target == GL_READ_FRAMEBUFFER) +context_bind_fbo(context, GL_DRAW_FRAMEBUFFER, draw_binding ? draw_binding : 0); +else +context_bind_fbo(context, GL_READ_FRAMEBUFFER, read_binding ? read_binding : 0); I don't think using 0 here is strictly wrong, but a proper NULL would probably be clearer. Indeed :/ As a followup, I think we can actually get rid of the glGenFramebuffers() in context_bind_fbo() these days and just pass a GLuint instead of a pointer. The only place left that actually creates FBOs should be context_apply_fbo_entry(). Good idea. I'll explore that. Thanks for the review, as usual.
Re: [PATCH 1/2] wined3d: Set GL_NONE for glReadBuffer / glDrawBuffer on FBO initialization.
On 25 April 2013 23:55, Matteo Bruni matteo.myst...@gmail.com wrote: 2013/4/25 Henri Verbeet hverb...@gmail.com: Seems ok, though a small comment explaining the issue this patch fixes probably wouldn't hurt. A comment in the commit message or in the code? The code. For example above the glReadBuffer(GL_NONE);.