You need a valid OpenGL context to do any OpenGL calls, and there's only a few Op methods that are called when there's a valid context. Generally speaking, calls with a ViewerContext passed to them (not to be confused with an OpenGL context) are safe to do OpenGL calls and those are basically build_handles() and draw_handles(). Nuke wasn't originally designed to allow engine threads access to the OpenGL context, so all the OpenGL support is oriented towards GUI-only purposes.
Maybe the Foundry can give more info - I'm sure they've got some plans in the works to allow engine threads to do OpenGL. -jonathan On May 23, 2011, at 8:32 AM, PieterVanHouten wrote: > Hi Ivan, > > thank you very much for your valuable feedback. I am still not sure if > draw_handles is the right place to do this. Please let me go a bit more into > details: > > i have my own Iop, that is supposed to do heavy OpenGL rendering into an > offscreen buffer. i then need to render this buffer to my output. So i need a > good render context while doing this. I found out that doing this in > draw_handles() works very well, but it feels wrong. > > What do you think? > > Thank you > Pieter > _______________________________________________ > Nuke-dev mailing list > [email protected], http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev _______________________________________________ Nuke-dev mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
