well, actually, i´m having a complete graphics corruption with these lines of code

what i´m passing to the wxglcanvas constructor it´s an int param_gl_canvas[3];

param_gl_canvas[0] = WX_GL_DEPTH_SIZE;
param_gl_canvas[1] = 32;
param_gl_canvas[2] = 0;

From: "David _" <[EMAIL PROTECTED]>
Reply-To: osg users <[email protected]>
To: [email protected]
Subject: [osg-users] zbuffer precision with osgviewer an wxwidgets
Date: Thu, 28 Jun 2007 16:31:44 +0200

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/

_________________________________________________________________
Acepta el reto MSN Premium: Protección para tus hijos en internet. Descárgalo y pruébalo 2 meses gratis. http://join.msn.com?XAPID=1697&DI=1055&HL=Footer_mailsenviados_proteccioninfantil

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

Reply via email to