obj plugin: Fix bug not adding first vertex index on writing GL_LINExxx array types
This commit is contained in:
parent
87597a7fff
commit
d08dbac902
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user