hi, i would like to know how to set my zbuffer precision using wxwidgets and the new viewer

right now what i´m doing is passing an attrib list to the wxglcanvas constructor so it´s done in 32bits zbuffer precision.

then comes the osg code with something named traits, and i have something like this (i took it from the wxwidgets example and modified it a little), this code is called after the constructor of wxglcanvas

_traits = new GraphicsContext::Traits;
_traits->x = pos.x;
_traits->y = pos.y;
_traits->width = size.x;
_traits->height = size.y;
_traits->depth = 32;
_traits->vsync = false;

setState( new osg::State );
getState()->setGraphicsContext(this);

if (_traits.valid() && _traits->sharedContext)
{

getState()->setContextID( _traits->sharedContext->getState()->getContextID() );
           incrementContextIDUsageCount( getState()->getContextID() );
}
else
{
getState()->setContextID( osg::GraphicsContext::createNewContextID() );
}



now this is the question --->>> how can i know if i´m having a 32bit zbuffer now??? do i need to set anything more in order to get a 32bits zbuffer???

i don´t know if it´s working now cause i still have some zbuffer corruption, but less than before

thanks in advance and sorry for my english

_________________________________________________________________
¿Estás pensando en cambiar de coche? Todas los modelos de serie y extras en MSN Motor. http://motor.msn.es/researchcentre/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to