dont zero the geometry buffer
This commit is contained in:
@@ -19,12 +19,19 @@ public class GlBuffer extends TrackedObject {
|
||||
public GlBuffer(long size) {
|
||||
this(size, 0);
|
||||
}
|
||||
public GlBuffer(long size, boolean zero) {
|
||||
this(size, 0, zero);
|
||||
}
|
||||
|
||||
public GlBuffer(long size, int flags) {
|
||||
this(size, flags, true);
|
||||
}
|
||||
|
||||
public GlBuffer(long size, int flags, boolean zero) {
|
||||
this.id = glCreateBuffers();
|
||||
this.size = size;
|
||||
glNamedBufferStorage(this.id, size, flags);
|
||||
if ((flags&GL_SPARSE_STORAGE_BIT_ARB)==0) {
|
||||
if ((flags&GL_SPARSE_STORAGE_BIT_ARB)==0 && zero) {
|
||||
this.zero();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public class BasicSectionGeometryData implements IGeometryData {
|
||||
glGetError();//Clear any errors
|
||||
GlBuffer buffer = null;
|
||||
if (!(Capabilities.INSTANCE.isNvidia && ThreadUtils.isWindows)) {
|
||||
buffer = new GlBuffer(geometryCapacity);//Only do this if we are not on nvidia
|
||||
buffer = new GlBuffer(geometryCapacity, false);//Only do this if we are not on nvidia
|
||||
//TODO: FIXME: TEST, see if the issue is that we are trying to zero the entire buffer, try only zeroing increments
|
||||
// or dont zero it at all
|
||||
} else {
|
||||
@@ -52,7 +52,7 @@ public class BasicSectionGeometryData implements IGeometryData {
|
||||
glBindBuffer(GL_ARRAY_BUFFER, buffer.id);
|
||||
glBufferPageCommitmentARB(GL_ARRAY_BUFFER, 0, geometryCapacity, true);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
buffer.zero();
|
||||
//buffer.zero();
|
||||
error = glGetError();
|
||||
if (error != GL_NO_ERROR) {
|
||||
buffer.free();
|
||||
|
||||
Reference in New Issue
Block a user