I'm trying to make a command line tool to generate images using
OpenGL. It's basically a helper app which receives render tasks
from a client over the network, does some number-crunching
(rendering to a Framebuffer and reading back via glReadPixels())
and sends back complete framebuffers to be displayed on the
client. I'm a bit lost in what to set up for OpenGL since all
documentation assumes display output in one way or another - just
calling vanilla OpenGL without any NSOpenGLContext in place
crashes. Any pointers?
You still need to create an OpenGL context in order to do any
OpenGL drawing. You should be able to use NSOpenGLContext (or
CGLCreateContext ) to create an OpenGL context even if there's no
screen. You may need to pass in NSOpenGLPFAOffScreen
Missed this message earlier but better late than never. You won't
get a hw accelerated context using NSOpenGLPFAOffScreen.
I think the easiest solution to this is to create a context and never
attach a drawable to it. Then create, bind and use and FBO for
rendering.
as part of the pixel format, I'm not sure if you need to specify
this explicitly. I'm also not sure if you'll actually get a
hardware accelerated context if it's not attached to an on screen
visual. IIRC this used to be the case in the past, but I don't know
if it is still the case.
Robert
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden