Anyone using pbuffers with sdl?

hiya,

…I’m trying to learn about the neat tricks one can do with render to
texture using pbuffers on OSX, but haven’t had any luck…since I’m
using SDL, and I know that the OSX code is using cocoa NSViews, am I
right to assume that I can get pbuffer support using CGL? Or do I also
have to use NSGL? Either way, has anyone been successful with single
contexts as opposed to shared contexts?

help!
jamie

This tutorial seems to accomplish it what you’re
asking:

http://www.gametutorials.com/download/Ports/OpenGL/RenderToTexture_SDL.zip

To run this guy’s tutorials on Mac OS X, I had to make
the following changes:

Makefile:
Line 1: Change “g++” to "g++ -I./
Line 6: Remove “-lgl -lglu”

Init.cpp
Line 293: Change “int main(void)” to “int main(int
argc, char **argv)”

And then I created a symbolic link. This is my shity
hack for compiling OpenGL applications from the
command-line on OSX, no one seems to be able to offer
me a less make-shift solution. If you know one, please
tell me!

$ ln -s
/System/Library/Frameworks/OpenGL.framework/Headers GL

Hope this helps!__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.

James Tittle II wrote:

hiya,

…I’m trying to learn about the neat tricks one can do with render to
texture using pbuffers on OSX, but haven’t had any luck…since I’m
using SDL, and I know that the OSX code is using cocoa NSViews, am I
right to assume that I can get pbuffer support using CGL? Or do I
also have to use NSGL? Either way, has anyone been successful with
single contexts as opposed to shared contexts?

As far as I know, there is no pbuffer support for OSX in SDL, only for
windows and x11.
If you look at the return from SDL_GetError, it will probably say that
pbuffers are unsupported.

Stephane

hey Donny,

…thanks for the link: it may just work for me :wink: As far as
avoiding a symbolic link to the OpenGL.framework, I usually just go in
and change the #include’s as follows:

include <OpenGL/gl.h>

include <OpenGL/glu.h>

…and then add “-framework OpenGL” instead of “-lgl -lglu”…

thanx again!
jamieOn Jun 12, 2004, at 9:37 PM, Donny Viszneki wrote:

And then I created a symbolic link. This is my shity
hack for compiling OpenGL applications from the
command-line on OSX, no one seems to be able to offer
me a less make-shift solution. If you know one, please
tell me!

$ ln -s
/System/Library/Frameworks/OpenGL.framework/Headers GL