Hi,
I'm trying to run opensg in linux. My problem is in the initialization
of the OSG::PassiveWindow, I think.
I get the Display* and the Window from another library (Currently QT is
taking care of them), und have to create my own GLXContext.
XVisualInfo *vi, visInfo;
XWindowAttributes winAttr;
XGetWindowAttributes(mMainWidget->getDeviceContext(),
mMainWidget->getWindowHandle(), &winAttr);
// get the existing glWidget's visual-id
memset(&visInfo, 0, sizeof(XVisualInfo));
visInfo.visualid = XVisualIDFromVisual(winAttr.visual);
// get a visual for the glx context
int nvis;
vi = XGetVisualInfo(mMainWidget->getDeviceContext(), VisualIDMask,
&visInfo, &nvis);
// is the visual GL-capable ?
int useGL;
glXGetConfig(mMainWidget->getDeviceContext(),
vi,
GLX_USE_GL,
&useGL );
if (!useGL)
{
std::wcout << L"Visual is not OpenGL-capable!" << std::endl;
}
int dummy;
if( ! glXQueryExtension( mMainWidget->getDeviceContext(), &dummy,
&dummy ) )
{
std::wcout << "Error: X server has no OpenGL GLX extension" <<
std::endl;
}
// create the new context
mContext = glXCreateContext(mMainWidget->getDeviceContext(), vi,
NULL, GL_TRUE);
if(!mContext)
{
std::wcout << L"ERROR: Invalid GL context!" << std::endl;
}
if(!glXMakeCurrent(mMainWidget->getDeviceContext(),
mMainWidget->getWindowHandle(), mContext))
{
std::wcout << L"Couldn't make mContext current" << std::endl;
}
This part of code works fine (None of the error messages is printed),
and it even works using another scenegraph drawing into the current
GLContext.
But when I call OSG::PassiveWindow, I get the following warnings (they
ssem to be the key to the problem).
WARNING: Window::getFunctionByName: Couldn't get function
'glProgramStringARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glBindProgramARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glDeleteProgramsARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glProgramLocalParameter4fvARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glGetProgramivARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function 'glTexImage3D'
for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glTexSubImage3D' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glActiveTextureARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glCompressedTexImage1DARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glCompressedTexSubImage1DARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glCompressedTexImage2DARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glCompressedTexSubImage2DARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glCompressedTexImage3DARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glCompressedTexSubImage3DARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glCombinerParameterfvNV' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glCombinerStageParameterfvNV' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glCombinerInputNV' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glCombinerOutputNV' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glFinalCombinerInputNV' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glPointParameterfEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glPointParameterfvEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glBlendColorEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glBlendEquation' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glColorTableSGI' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glColorTableEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord2dARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glCombinerParameteriNV' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glTexImage3DEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glSecondaryColor3fEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glSecondaryColor3fvEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glSecondaryColor3bvEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glSecondaryColor3ubvEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glSecondaryColor3svEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glSecondaryColor3usvEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glSecondaryColor3ivEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glSecondaryColor3uivEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glSecondaryColor3dvEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord1svARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord2svARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord3svARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord4svARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord1ivARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord2ivARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord3ivARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord4ivARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord1fvARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord2fvARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord3fvARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord4fvARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord1dvARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord2dvARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord3dvARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glMultiTexCoord4dvARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glSecondaryColorPointerEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glClientActiveTextureARB' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glLockArraysEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glUnlockArraysEXT' for Window 0x8400dd0.
WARNING: Window::getFunctionByName: Couldn't get function
'glDrawRangeElementsEXT' for Window 0x8400dd0.
Then I see the rendered Window (I use a different bgcolor), and
everything seems ok. (At this time, the scenegraph is empty).
Now I load some geometry into it, and get a crash. Using the debugger I
get down to
OSGGeoPumpFactory.cpp , line 877.
But I think this line shouln't be reached.
Shouldn't line 871 fail, because in the warnings above I found: Couldn't
get function 'glLockArraysEXT'.
Does anyone have a clue what to do?
Thx,
Marco
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users