obj plugin: Fix bug not adding first vertex index on writing GL_LINExxx array types

This commit is contained in:
Ralf Habacker 2018-01-16 10:23:36 +01:00 committed by Robert Osfield
parent 87597a7fff
commit d08dbac902

View File

@ -383,7 +383,7 @@ void ObjPrimitiveIndexWriter::drawArrays(GLenum mode,GLint first,GLsizei count)
for(GLsizei i=0;i<count;++i)
{
writePoint(i);
writePoint(first + i);
}
break;
}
@ -392,7 +392,7 @@ void ObjPrimitiveIndexWriter::drawArrays(GLenum mode,GLint first,GLsizei count)
{
for(GLsizei i=0;i<count;i+=2)
{
writeLine(i, i+1);
writeLine(first + i, first + i+1);
}
break;
}
@ -400,7 +400,7 @@ void ObjPrimitiveIndexWriter::drawArrays(GLenum mode,GLint first,GLsizei count)
{
for(GLsizei i=1;i<count;++i)
{
writeLine(i-1, i);
writeLine(first + i-1, first + i);
}
break;
}
@ -408,9 +408,9 @@ void ObjPrimitiveIndexWriter::drawArrays(GLenum mode,GLint first,GLsizei count)
{
for(GLsizei i=1;i<count;++i)
{
writeLine(i-1, i);
writeLine(first + i-1, first + i);
}
writeLine(count-1, 0);
writeLine(first + count-1, first + 0);
break;
}
default: