Hi Dirk, > > I managed to set-up a skybox with the > > standard camera of the SimpleSceneManager. > > When I use my own MatrixCamera the > > background is black. Here's some of > > my code: > > > > skyBack = SkyBackground::create(); > > // etc... > > > > camera = MatrixCamera::create(); > > > > Matrix modelViewMatrix; > > osg::MatrixLookAt( modelViewMatrix, 0, 0, 0, 0, 0, -1, 0, 1, 0 ); > > > > > > beginEditCP(camera); > > camera->setModelviewMatrix(modelViewMatrix); > > camera->setProjectionMatrix(m); // the projection matrix is ok! > > endEditCP(camera); > > The SkyBackground uses the near and far values from the camera to > calculate the scale of the box/sphere. Given that you don't need it for > the MatrixCamera you probably don't set it. But you do need it to > calculate the matrix, so the information should be somewhere in your > system.
Ok, setting camera->setNear(..) and camera->setFar(..) works great! Thank you for the hint. Bye, Toni ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
