obj plugin: Fix bug not adding first vertex index on writing GL_LINExxx array types
This commit is contained in:
parent
2e33cf0abc
commit
cbf5b14f61
@ -384,7 +384,7 @@ void ObjPrimitiveIndexWriter::drawArrays(GLenum mode,GLint first,GLsizei count)
|
||||
|
||||
for(GLsizei i=0;i<count;++i)
|
||||
{
|
||||
writePoint(i);
|
||||
writePoint(first + i);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -393,7 +393,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;
|
||||
}
|
||||
@ -401,7 +401,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;
|
||||
}
|
||||
@ -409,9 +409,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