From Ruben Lopez, updates to VRML/IV loader.
From Ben Discoe, corrections to comments in osg::Transform From Alberto Barbati, Lazy evaluation of inverse matrix in osg::MatrixTransfrom
This commit is contained in:
@@ -672,9 +672,12 @@ void Viewer::display()
|
||||
// application traverasal.
|
||||
times[2].timeApp+=app(i);
|
||||
|
||||
|
||||
// cull traverasal.
|
||||
times[2].timeCull+=cull(i);
|
||||
|
||||
if (_printStats>=1) glFinish();
|
||||
|
||||
// draw traverasal.
|
||||
times[2].timeDraw+=draw(i);
|
||||
if (_printStats==Statistics::STAT_PRIMSPERVIEW)
|
||||
|
||||
@@ -33,14 +33,17 @@ extern int yyparse();
|
||||
extern int yydebug;
|
||||
extern MyNode *getRoot();
|
||||
extern FILE *yyin;
|
||||
|
||||
int isatty(int) { return 0; }
|
||||
extern void flush_scanner();
|
||||
|
||||
osg::Node *readVRMLNode(const char *file) {
|
||||
yydebug=0;
|
||||
yyin=fopen(file,"r");
|
||||
std::cout << "Parsing..." << std::endl;
|
||||
if (yyparse()!=0) return 0;
|
||||
if (yyparse()!=0) {
|
||||
flush_scanner();
|
||||
return 0;
|
||||
}
|
||||
osg::ref_ptr<MyNode> n=getRoot();
|
||||
try {
|
||||
std::cout << "Generating OSG tree..." << std::endl;
|
||||
|
||||
@@ -225,10 +225,10 @@ void OSGVisitor::makeGeode(osg::Geode *geode, osg::Geometry *geometry, bool twoS
|
||||
state->setAttributeAndModes(frontface,osg::StateAttribute::ON);
|
||||
osg::CullFace *cull=new osg::CullFace();
|
||||
cull->setMode(osg::CullFace::BACK);
|
||||
if (twoSided) {
|
||||
if (!twoSided) {
|
||||
state->setAttributeAndModes(cull,osg::StateAttribute::ON);
|
||||
} else {
|
||||
std::cout << "Deactivating culling for this object" << std::endl;
|
||||
//std::cout << "Deactivating culling for this object" << std::endl;
|
||||
state->setAttributeAndModes(cull,osg::StateAttribute::OFF);
|
||||
osg::Transparency *transp=new osg::Transparency();
|
||||
transp->setFunction(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
@@ -2116,3 +2116,8 @@ int yywrap(void)
|
||||
{
|
||||
return (1);
|
||||
}
|
||||
|
||||
void flush_scanner(void) {
|
||||
yy_flush_buffer(YY_CURRENT_BUFFER);
|
||||
|
||||
}
|
||||
|
||||
@@ -84,3 +84,8 @@ int yywrap(void)
|
||||
{
|
||||
return (1);
|
||||
}
|
||||
|
||||
void flush_scanner(void) {
|
||||
yy_flush_buffer(YY_CURRENT_BUFFER);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user