Hi everybody:
I've a working application (Windows, MFC) with an OSG scene in one
window, that works correctly when I use OSG's DLLs. But, in order to
distribute it, I prefer an all-in-one executable, so I've built OSG
v2.8.2 statically, linked to my app with success.
But when I run it, it does not display anything in its window. I've
debugged the differences between the statically and dynamically versions
to a point. In the statically built, the:
osg::GraphicsContext::createGraphicsContext(traits.get())
returns NULL, and in dynamically doesn't.
If I debug deeper, I find it's because:
windowingSystemInterfaceRef()
returns NULL
And that's because that function is:
static ref_ptr<GraphicsContext::WindowingSystemInterface>
&windowingSystemInterfaceRef()
{
static ref_ptr<GraphicsContext::WindowingSystemInterface>
s_WindowingSystemInterface;
return s_WindowingSystemInterface;
}
My questions:
How can that function return NULL? Why a different behaviour between
static and dynamic linkage?
Best regards
--
* Iñaki García
División de Ingeniería - Engineering Division
European Virtual Engineering (EUVE) <http://www.euve.org>*
Avenida de los Huetos 79, "Edificio azucarera"
01010 Vitoria-Gasteiz (Álava) - Spain
Tel: +34 945 21 46 46 Fax: +34 945 21 46 47
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org