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);
|
||||
addPoolItems(l, sbuf);
|
||||
//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
|
||||
// buffer otherwise one cant use the full
|
||||
// VertexItem
|
||||
//verticesCnt = 1;
|
||||
// VertexItem (see Layers.compile)
|
||||
// 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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user