don't use vertex arrays anymore

This commit is contained in:
codeanticode
2013-10-20 19:15:04 -04:00
parent bcf4587120
commit 1d7bd062b5
3 changed files with 86 additions and 37 deletions

View File

@@ -985,6 +985,29 @@ public class PJOGL extends PGL {
// Utility functions
@Override
protected void enableTexturing(int target) {
if (PROFILE == 2) enable(target);
if (target == TEXTURE_2D) {
texturingTargets[0] = true;
} else if (target == TEXTURE_RECTANGLE) {
texturingTargets[1] = true;
}
}
@Override
protected void disableTexturing(int target) {
if (PROFILE == 2) disable(target);
if (target == TEXTURE_2D) {
texturingTargets[0] = false;
} else if (target == TEXTURE_RECTANGLE) {
texturingTargets[1] = false;
}
}
@Override
protected int getFontAscent(Object font) {
FontMetrics metrics = pg.parent.getFontMetrics((Font)font);
@@ -1670,14 +1693,14 @@ public class PJOGL extends PGL {
gl2.glVertexAttribPointer(index, size, type, normalized, stride, offset);
}
@Override
public void vertexAttribPointer(int index, int size, int type, boolean normalized, int stride, Buffer data) {
if (gl2x != null) {
gl2x.glVertexAttribPointer(index, size, type, normalized, stride, data);
} else if (gl3bc != null) {
gl3bc.glVertexAttribPointer(index, size, type, normalized, stride, data);
}
}
// @Override
// public void vertexAttribPointer(int index, int size, int type, boolean normalized, int stride, Buffer data) {
// if (gl2x != null) {
// gl2x.glVertexAttribPointer(index, size, type, normalized, stride, data);
// } else if (gl3bc != null) {
// gl3bc.glVertexAttribPointer(index, size, type, normalized, stride, data);
// }
// }
@Override
public void enableVertexAttribArray(int index) {
@@ -1699,14 +1722,14 @@ public class PJOGL extends PGL {
gl.glDrawElements(mode, count, type, offset);
}
@Override
public void drawElements(int mode, int count, int type, Buffer indices) {
if (gl2x != null) {
gl2x.glDrawElements(mode, count, type, indices);
} else if (gl3bc != null) {
gl3bc.glDrawElements(mode, count, type, indices);
}
}
// @Override
// public void drawElements(int mode, int count, int type, Buffer indices) {
// if (gl2x != null) {
// gl2x.glDrawElements(mode, count, type, indices);
// } else if (gl3bc != null) {
// gl3bc.glDrawElements(mode, count, type, indices);
// }
// }
//////////////////////////////////////////////////////////////////////////////