fix possible invalid vbo reads
- make sure there is an additional vertex for interleaving
This commit is contained in:
parent
b328d769a5
commit
ecedccb265
@ -157,6 +157,8 @@ public class Layers {
|
|||||||
//sbuf.position(sbuf.position() + 6);
|
//sbuf.position(sbuf.position() + 6);
|
||||||
addPoolItems(l, sbuf);
|
addPoolItems(l, sbuf);
|
||||||
//l.offset -= 12;
|
//l.offset -= 12;
|
||||||
|
|
||||||
|
sbuf.position(sbuf.position() + 6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -94,8 +94,13 @@ public final class LineTexLayer extends Layer {
|
|||||||
|
|
||||||
// HACK add one vertex offset when compiling
|
// HACK add one vertex offset when compiling
|
||||||
// buffer otherwise one cant use the full
|
// buffer otherwise one cant use the full
|
||||||
// VertexItem
|
// VertexItem (see Layers.compile)
|
||||||
//verticesCnt = 1;
|
// add the two 'x' at front and end
|
||||||
|
//verticesCnt = 2;
|
||||||
|
|
||||||
|
// the additional end vertex to make sure
|
||||||
|
// not to read outside allocated memory
|
||||||
|
verticesCnt = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
VertexPoolItem si = curItem;
|
VertexPoolItem si = curItem;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user