Example #1
0
 public void unbind(GL2 gl) {
   lock.lock();
   try {
     if (boundType != null) {
       boundType.unbind(gl);
       boundType = null;
     } else if (boundGenericIndex > 0) {
       GLVertexAttribute.unbind(gl, boundGenericIndex);
       boundGenericIndex = -1;
     }
   } finally {
     lock.unlock();
   }
 }
Example #2
0
 public void bind(GLVertexAttribute type, GL2 gl) {
   lock.lock();
   try {
     prepare(gl);
     type.bind(gl, 0, 0);
     boundType = type;
   } finally {
     lock.unlock();
   }
 }