Hi,

> Antonio Bleile wrote:
> > Hi,
> >
> > I'm currently writing a library which uses some OpenSG stuff.
> > The library is static and within the library I create FBO's.
> > I took my tested code from my small stand-alone application
> > and pasted it into the library code, so the code itself should
> > be ok.
> > The problem now is, when I use the library I get wild crashes
> > inside the OSGSystem library. I'm suspicious about the fact
> > that I'm creating a static windows library. I have successfully
> > used dll libraries which used OpenSG so far. I'm using VS.NET
> > 2005 and a recent OpenSG dailybuild. Here are my compiler flags
> > for the library:
> >
> >
> [snip]
> > Do you have any ideas what might be wrong???
> >
> Be aware that unreferenced compilation units are optimized away when
> using static libraries. This does not happen with dlls/exes. (So if you
> have a cpp file that only registers itself in a factory, it might not be
> executed unless there is a call from main() into the function itself.)
> There is a pattern called NiftyCounter that works around that.

Interesting to know but that wasn't the problem.

> There could also be a few similar issues with initalization order. Are
> you sure that you don't call anything (important) in OpenSG before
> osgInit()?

Wasn't this either ;)

> There might be something else too, do you have a call stack?

It turns out that the problem was something very different.
I figured that I can't render the fbo viewport without
issuing a render on the SimpleSceneManager. The tutorial
states a comment:

    // make sure the window is setup before rendering to the FBO
    mgr->redraw();

If you remove this redraw from the tutorial sample (29FBOTexture), 
it crashes. Would be nice if that could be avoided as it a little
bit dirty. I don't know how complicated it is though. 

Thank you and regards,


  Toni


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to