mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Map buffer with correct type according to attrib type
This commit is contained in:
@@ -9920,7 +9920,13 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
}
|
||||
|
||||
protected void mapPolyAttribBuffer(VertexAttribute attrib) {
|
||||
polyAttribBuffers.put(attrib.name, pg.pgl.mapBuffer(PGL.ARRAY_BUFFER, PGL.WRITE_ONLY).asFloatBuffer());
|
||||
if (attrib.type == PGL.FLOAT) {
|
||||
polyAttribBuffers.put(attrib.name, pg.pgl.mapBuffer(PGL.ARRAY_BUFFER, PGL.WRITE_ONLY).asFloatBuffer());
|
||||
} else if (attrib.type == PGL.INT) {
|
||||
polyAttribBuffers.put(attrib.name, pg.pgl.mapBuffer(PGL.ARRAY_BUFFER, PGL.WRITE_ONLY).asIntBuffer());
|
||||
} else if (attrib.type == PGL.BOOL) {
|
||||
polyAttribBuffers.put(attrib.name, pg.pgl.mapBuffer(PGL.ARRAY_BUFFER, PGL.WRITE_ONLY));
|
||||
}
|
||||
}
|
||||
|
||||
protected void initPolyAttribsBuffer(VertexAttribute attrib, boolean onlymap, boolean unmap, int usage) {
|
||||
|
||||
Reference in New Issue
Block a user