Fixed shadows warnigns
This commit is contained in:
parent
304c048d84
commit
80e318ce15
@ -326,10 +326,10 @@ bool DePee::createHUD()
|
|||||||
|
|
||||||
geom->addPrimitiveSet(new osg::DrawArrays(GL_QUADS,0,4));
|
geom->addPrimitiveSet(new osg::DrawArrays(GL_QUADS,0,4));
|
||||||
|
|
||||||
osg::StateSet* stateset = geom->getOrCreateStateSet();
|
osg::StateSet* ss = geom->getOrCreateStateSet();
|
||||||
stateset->setMode(GL_BLEND,osg::StateAttribute::ON);
|
ss->setMode(GL_BLEND,osg::StateAttribute::ON);
|
||||||
|
|
||||||
stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
|
ss->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
|
||||||
|
|
||||||
//geode->addDrawable(geom);
|
//geode->addDrawable(geom);
|
||||||
}
|
}
|
||||||
|
@ -79,9 +79,7 @@ struct CommandLineOptions
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int width, height;
|
|
||||||
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
|
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
|
||||||
|
|
||||||
distance = sqrt(sphere_radius*sphere_radius - collar_radius*collar_radius);
|
distance = sqrt(sphere_radius*sphere_radius - collar_radius*collar_radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,9 +556,9 @@ void setDomeCorrection(osgViewer::Viewer& viewer, CommandLineOptions& options)
|
|||||||
camera->setName("Top face camera");
|
camera->setName("Top face camera");
|
||||||
camera->setGraphicsContext(gc.get());
|
camera->setGraphicsContext(gc.get());
|
||||||
camera->setViewport(new osg::Viewport(0,0,camera_width, camera_height));
|
camera->setViewport(new osg::Viewport(0,0,camera_width, camera_height));
|
||||||
GLenum buffer = traits->doubleBuffer ? GL_BACK : GL_FRONT;
|
GLenum cbuffer = traits->doubleBuffer ? GL_BACK : GL_FRONT;
|
||||||
camera->setDrawBuffer(buffer);
|
camera->setDrawBuffer(cbuffer);
|
||||||
camera->setReadBuffer(buffer);
|
camera->setReadBuffer(cbuffer);
|
||||||
camera->setAllowEventFocus(false);
|
camera->setAllowEventFocus(false);
|
||||||
|
|
||||||
// tell the camera to use OpenGL frame buffer object where supported.
|
// tell the camera to use OpenGL frame buffer object where supported.
|
||||||
@ -668,9 +666,9 @@ void setDomeCorrection(osgViewer::Viewer& viewer, CommandLineOptions& options)
|
|||||||
camera->setClearMask(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT );
|
camera->setClearMask(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT );
|
||||||
camera->setClearColor( osg::Vec4(0.1,0.1,1.0,1.0) );
|
camera->setClearColor( osg::Vec4(0.1,0.1,1.0,1.0) );
|
||||||
camera->setViewport(new osg::Viewport(0, 0, options.width, options.height));
|
camera->setViewport(new osg::Viewport(0, 0, options.width, options.height));
|
||||||
GLenum buffer = traits->doubleBuffer ? GL_BACK : GL_FRONT;
|
GLenum cbuffer = traits->doubleBuffer ? GL_BACK : GL_FRONT;
|
||||||
camera->setDrawBuffer(buffer);
|
camera->setDrawBuffer(cbuffer);
|
||||||
camera->setReadBuffer(buffer);
|
camera->setReadBuffer(cbuffer);
|
||||||
camera->setReferenceFrame(osg::Camera::ABSOLUTE_RF);
|
camera->setReferenceFrame(osg::Camera::ABSOLUTE_RF);
|
||||||
camera->setAllowEventFocus(false);
|
camera->setAllowEventFocus(false);
|
||||||
//camera->setInheritanceMask(camera->getInheritanceMask() & ~osg::CullSettings::CLEAR_COLOR & ~osg::CullSettings::COMPUTE_NEAR_FAR_MODE);
|
//camera->setInheritanceMask(camera->getInheritanceMask() & ~osg::CullSettings::CLEAR_COLOR & ~osg::CullSettings::COMPUTE_NEAR_FAR_MODE);
|
||||||
|
@ -794,8 +794,8 @@ class ShaderGeometry : public osg::Drawable
|
|||||||
ShaderGeometry() { setUseDisplayList(false); }
|
ShaderGeometry() { setUseDisplayList(false); }
|
||||||
|
|
||||||
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
||||||
ShaderGeometry(const ShaderGeometry& ShaderGeometry,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
|
ShaderGeometry(const ShaderGeometry& sg,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
|
||||||
osg::Drawable(ShaderGeometry,copyop) {}
|
osg::Drawable(sg,copyop) {}
|
||||||
|
|
||||||
META_Object(osg,ShaderGeometry)
|
META_Object(osg,ShaderGeometry)
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ static int inited = 0;
|
|||||||
static float dbcenter[3];
|
static float dbcenter[3];
|
||||||
static float dbradius;
|
static float dbradius;
|
||||||
|
|
||||||
static void getDatabaseCenterRadius( float dbcenter[3], float *dbradius )
|
static void computeDatabaseCenterRadius()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
double n=0.0;
|
double n=0.0;
|
||||||
@ -68,7 +68,7 @@ static void getDatabaseCenterRadius( float dbcenter[3], float *dbradius )
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*dbradius = r;
|
dbradius = r;
|
||||||
dbcenter[0] = (float)center[0];
|
dbcenter[0] = (float)center[0];
|
||||||
dbcenter[1] = (float)center[1];
|
dbcenter[1] = (float)center[1];
|
||||||
dbcenter[2] = (float)center[2];
|
dbcenter[2] = (float)center[2];
|
||||||
@ -82,7 +82,7 @@ static void getDatabaseCenterRadius( float dbcenter[3], float *dbradius )
|
|||||||
|
|
||||||
static void init( void )
|
static void init( void )
|
||||||
{
|
{
|
||||||
getDatabaseCenterRadius( dbcenter, &dbradius );
|
computeDatabaseCenterRadius();
|
||||||
inited = 1;
|
inited = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user