Johan Robben wrote:
> Hey all,
>
> Thank you for the help so far, I'm making progress.
>
> I have been using this tutorial:
> http://www.codeproject.com/opengl/opengl_activex.asp
> and the "testPassiveWindow" code, to combine OpenSG, OpenGL and ActiveX.
>
> I have one remaining issue though.
>
> Because, I don't want to create a window myself, I leave out
> "glutCreateWindow("OpenSG");" and "glutMainLoop();".
>
> But then I receive a nullpointer error from PassiveWindow::Init().
> It happens in this piece of code:
>
> void OSG::Window::frameInit(void) {
> ...
>        const char *version = 
>                 reinterpret_cast<const char *>(glGetString(GL_VERSION));
>         
>         int major = atoi(version);
> ...
> }
>
> Apparantly there is something wrong with 'version'.
> I'm guessing the glutCreateWindow initializes this ?
>   
> Is there another way to do the initialisation that glutCreateWindow does,
> without creating a window ? Or is there something else going on here?
>   
You need an active gl context to be able to call opengl. You must 
initialize this yourself when using PassiveWindow.

So, you're probably missing a wglCreateContext() call, which (I'd guess) 
is otherwise done by glutCreateWindow. Look it up on MSDN.

Cheers,
/Marcus

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to