Re: [info-performer] building pbuffer sample: glXMakeCurrentReadSGI

Date view Thread view Subject view Author view

From: Bram Stolk (bram++at++sara.nl)
Date: 02/23/2005 06:12:05


Hello,

To re-visit the pbuffer.c example issue:
It works pretty well for me, but I have three remaining problems:

1) Even though the rendering is done off-screen, the code still
    opens a visible window on the desktop of the same size, but
    its contents remains black. So even though the pbuffer offscreen
    rendering works, why open an empty window? Can I get rid of it?

2) nvidia-settings tools can be used to overide AA-settings.
    This works for all performer programs I try, except for the
    pbuffer. I've reported this to the nvidia support forum, but
    maybe someone on this list knows why this is?

3) I tried very hard to convert pbuffer.c to C++
    I managed to convert all code to C++, except for the
    OpenPBuf(pfPipeWindow *pw) function.
    My C++ versions give this error:

PF Warning/Usage: pfWindow::open - window of type
PFWIN_TYPE_PBUFFER - required GLXFBConfig is NULL - set with ::setFBConfig.

    If I do the setFBConfig, with the arg retrieved from
    glXChooseFBConfigSGIX(), I get SIGCHLD.
    Also if I get the cfg via pfuChooseFBConfig() instead.
    When I keep using the C variant of OpenPBuf, it works OK.

Thanks,

   Bram

Bram Stolk wrote:
> Benedikt Kessler wrote:
>
>> Hi!
>>
>> If you are able to compile and use programs that make use of the GLX
>> 1.3 call glXCreatePbuffer(), then you should replace the extension
>> call glXMakeCurrentReadSGI (and maybe others) by glXMakeContextCurrent.
>>
>> The glX calls are usually defined in libGL.so
>
>
> Benedikt, thanks!
>
> There is indeed an alternative piece of code for the case that
> #ifdef GLX_SGI_make_current_read evaluates as false.
> If I force this to false, I can build and run it.
>
> I want to use this to render images *much* larger than my screenspace.
> Although this works pretty well, I see unexpected performance behaviour:
> on my 1280x1024 deskop, 1600x1600 pbuffer sizes perform satisfactory,
> like 10 fps or so. 2000x2000 performance drops drastically to 0.3 fps
> or so. Maybe I'm running out of graphics memory or something. I'll see if
> I can find out if there are hard-limits for pbuffers.
>
> Thanks again,
>
> Bram
>
> PS: Ofcourse the pbuffer sample has an overhead by doing a writepixels
> on a visible window. Without this 2nd context, maybe performance will not
> drop at 2Kx2K. I'm aiming for a 7000x5000 resolution :-)
>
>
>> Bye! Benedikt
>>
>>
>> Bram Stolk wrote:
>>
>>> Hello,
>>>
>>> I'm trying to build /usr/share/Performer/src/pguide/libpf/C/pbuffer.c
>>>
>>> Reading this old posting:
>>> http://oss.sgi.com/projects/performer/mail/info-performer/perf-03-08/0087.html
>>>
>>> I see that Alexandre could build it.
>>>
>>> I'm on pf3.2 linux, and the pbuffer is not a target in the GNUMakefile.
>>> If I add pbuffer as a target, and build it, I get:
>>>
>>> make[2]: Entering directory
>>> `/usr/share/Performer/src/pguide/libpf/C/OPT.I386'
>>> cc -O3 -ffast-math -mcpu=pentiumpro -MD -fPIC -DI386 -DLinux
>>> -I..
>>> -I/usr/include -I/usr/X11R6/include -o pbuffer.dsocmd pbuffer.o
>>> -L/usr/lib
>>> -L/usr/lib/libpfdb -L/lib -lpfv -lpfdu -lpfutil -lpfdu -lpfui -lpf
>>> -L/usr/X11R6/lib -lGLU -lGL -lXext -lpthread -lGLw -lXm -lXt -lXp
>>> -lXpm -lXmu
>>> -lX11 -lm -ldl
>>> pbuffer.o(.text+0x96e): In function `DrawCopy':
>>> : undefined reference to `glXMakeCurrentReadSGI'
>>> collect2: ld returned 1 exit status
>>> make[2]: *** [pbuffer.dsocmd] Error 1
>>>
>>> In which library does this symbol normally reside?
>>>
>>> I can build programs that use glXCreatePbuffer() without problems, so
>>> I know
>>> that my NVIDIA 66.29 system is capable of pbuffers.
>>>
>>> Thanks!
>>>
>>> Bram
>>>
>>> -----------------------------------------------------------------------
>>> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
>>> Open Development Project: http://oss.sgi.com/projects/performer/
>>> Submissions: info-performer++at++sgi.com
>>> Admin. requests: info-performer-request++at++sgi.com
>>> -----------------------------------------------------------------------
>>
>>
>>
>
>


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Feb 23 2005 - 06:12:17 PST