Thanks Laurens, changes look sensible, I haven't been able to change
them as my ATI driver under Linux is reporting no pbuffer support.
Changes now merged and submitted to svn/trunk.

On Fri, Jan 15, 2010 at 3:38 PM, Laurens Voerman <[email protected]> wrote:
> Hi Robert,
> Wile working with pbuffers I noticed that the Win32 implementation uses the
> attribute WGL_PBUFFER_LARGEST_ARB.
>
>> quote from http://www.opengl.org/registry/specs/ARB/wgl_pbuffer.txt
>>    The following attributes are supported by wglCreatePbufferARB:
>>
>>      WGL_PBUFFER_LARGEST_ARB     If this attribute is set to a
>>                                  non-zero value, the largest
>>                                  available pbuffer is allocated
>>                                  when the allocation of the pbuffer
>>                                  would otherwise fail due to
>>                                  insufficient resources.  The width
>>                                  or height of the allocated pbuffer
>>                                  never exceeds <iWidth> and <iHeight>,
>>                                  respectively.  Use wglQueryPbufferARB
>>                                  to retrieve the dimensions of the
>>                                  allocated pbuffer.
>
> It notifies the user when the size is not as requested, but I could find no
> way for the program to detect this. I've added two lines to write the new
> size back into the _traits, I think this is appropriate, but I am not
> absolutely sure.
>
> In PixelBufferX11 was no support, so I've added GLX_LARGEST_PBUFFER(_SGIX)
> support, with the same writeback to the _trais.
>
>
> I have tested the GLX_LARGEST_PBUFFER version on linux and the
> WGL_PBUFFER_LARGEST_ARB with windows, all tested with the modified
> autocapture I just submitted.
>
>
> "autocapture --pbuffer --window 100 100 18192 18192
> cow.osg.\[0,0,-22.7\].trans"
> gives me a 4096x4096 image on my windows machine,
> and a 8192x8192 image on linux.
>
> attached zipfile has the modified version of
>        OpenSceneGraph\src\osgViewer\PixelBufferWin32.cpp
>        OpenSceneGraph\src\osgViewer\PixelBufferX11.cpp
>
> Thanks,
> Laurens.
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to