id of bound texture is stored in client side (PGL)

This commit is contained in:
codeanticode
2012-07-26 14:46:33 +00:00
parent 61e13ecc07
commit 003ea07a51
3 changed files with 20 additions and 23 deletions

View File

@@ -100,8 +100,6 @@ public class Texture implements PConstants {
protected boolean modified;
protected int mx1, my1, mx2, my2;
protected int[] tempName = { 0 };
protected Object bufferSource;
protected LinkedList<BufferData> bufferCache = null;
protected Method disposeBufferMethod;
@@ -583,7 +581,7 @@ public class Texture implements PConstants {
public void unbind() {
if (boundTexture() == glName) {
if (pgl.textureIsBound(glTarget, glName)) {
// We don't want to unbind another texture
// that might be bound instead of this one.
if (!pgl.texturingIsEnabled(glTarget)) {
@@ -782,12 +780,6 @@ public class Texture implements PConstants {
// Utilities
protected int boundTexture() {
pgl.glGetIntegerv(glTarget, tempName, 0);
return tempName[0];
}
/**
* Flips intArray along the X axis.
* @param intArray int[]