On 10/08/2014 at 06:24, xxxxxxxx wrote:
Cinema 4D Version: R14
Platform: Windows ;
Language(s) : C++ ;
is someone able to shed some light on how to create and work with an OpenGL context using the C4D_CreateOpenGLContext()? I'm trying to create a preview in a GeUserArea, and I'm needing OGL because I need a little more grunt than what the native draws can provide. Something similar to a material preview. I'm not after OGL support, but rather on how to get it started with as much c4d-related code as possible. There is just nothing anywhere on how to use the native-SDK objects on this matter.
I can briefly describe what I'm trying to do, as creating an OGL context, draw into it, then use glReadPixels() on the memory buffer to transfer the draw pixel data into a BaseBitmap.
My hand is being forced on this, as it's a significant part of the plugin and I can't get any further without this now. I'm a user at the OpenGL community, but I would rather use as much c4d-related code as I can before delving too much into doing it outside of the native-SDK objects. As I mentioned, I'm not after OGL support in general, but rather on how to create and work with a context using C4D SDK objects so that I can retrieve it's pixel data - i.e. setting the context up and making it current.
EDIT: spelling update