From: Michel D. <mi...@da...> - 2009-04-03 08:07:40
|
On Thu, 2009-04-02 at 16:28 -0400, Kristian Høgsberg wrote: > > Ok, yes, glDrawBuffer(GL_FRONT) has to work, but always allocating an > extra color buffer that most apps won't ever use is not a good use of > memory. So what about this: for a double buffered visual, the dri > driver doesn't ask for the front at all, which the loader should > handle just fine. Then if the app wants to draw to the front buffer, > it will call getbuffers, but asking for the front buffer and not the > back buffer, that is, identical to the request it would issue for a > single buffered visual. And then it just works, since if the drawable > is a window, we'll ask for the fake front instead and pass that to the > driver. One problem with this is that the server side DRI2GetBuffers() currently only re-allocates buffers from the driver if the drawable size changes; it doesn't check if the buffer attachments or even the number of buffers requested change. Even assuming that can be solved, don't we still need both buffers for things like glCopyPixels with glReadBuffer != glDrawBuffer? -- Earthling Michel Dänzer | http://www.vmware.com Libre software enthusiast | Debian, X and DRI developer |