Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenGL command line tool




On May 6, 2007, at 2:58 PM, Robert Chin wrote:

On May 6, 2007, at 1:26 PM, Simon Bierbaum wrote:
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

This email sent to email@hidden
References: 
 >OpenGL command line tool (From: Simon Bierbaum <email@hidden>)
 >Re: OpenGL command line tool (From: Robert Chin <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.