Removed comments, and move the tri stipper slightly later in the code to
apply it on all geometries.
This commit is contained in:
@@ -591,18 +591,10 @@ osg::Drawable* ReaderWriterOBJ::makeDrawable_useSeperateIndices(GLMmodel* obj, G
|
||||
|
||||
if (indexArraysEqual)
|
||||
{
|
||||
//std::cout<<"Use draw element"<<std::endl;
|
||||
|
||||
geom->addPrimitiveSet(new osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLES,vertexIndices->begin(),vertexIndices->end()));
|
||||
|
||||
osgUtil::TriStripVisitor tsv;
|
||||
tsv.stripify(*geom);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//std::cout<<"Use sepeate indices arrays"<<std::endl;
|
||||
|
||||
geom->setVertexIndices(vertexIndices.get());
|
||||
if (needColors) geom->setColorIndices(vertexIndices.get());
|
||||
if (needNormals) geom->setNormalIndices(normalIndices.get());
|
||||
@@ -613,6 +605,9 @@ osg::Drawable* ReaderWriterOBJ::makeDrawable_useSeperateIndices(GLMmodel* obj, G
|
||||
|
||||
}
|
||||
|
||||
osgUtil::TriStripVisitor tsv;
|
||||
tsv.stripify(*geom);
|
||||
|
||||
if (obj->numnormals==0)
|
||||
{
|
||||
osgUtil::SmoothingVisitor tsv;
|
||||
|
||||
@@ -277,11 +277,9 @@ _glmReadMTLTextureOptions(GLMmodel* model, unsigned int materialIndex, char* lin
|
||||
{
|
||||
char *token;
|
||||
char seps[] = " \t\n\r\f\v";
|
||||
std::cout<<"line ["<<line<<"]"<<std::endl;
|
||||
token = ::strtok(line, seps);
|
||||
while(NULL != token)
|
||||
{
|
||||
std::cout<<"token ["<<token<<"]"<<std::endl;
|
||||
switch(token[0])
|
||||
{
|
||||
case '-':
|
||||
@@ -346,8 +344,6 @@ _glmReadMTLTextureOptions(GLMmodel* model, unsigned int materialIndex, char* lin
|
||||
if (0 != strlen(token))
|
||||
{
|
||||
model->materials[materialIndex].textureName = strdup(token);
|
||||
std::cout<<"token ["<<token<<"]"<<std::endl;
|
||||
std::cout<<"reading material ["<<model->materials[materialIndex].textureName<<"]"<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user