@Override public String toString(){ String dataTxt = null; if (data != null){ dataTxt = ", elements="+data.limit(); } return getClass().getSimpleName() + "[fmt="+format.name() +", type="+bufType.name() +", usage="+usage.name() +dataTxt+"]"; }
@Override public void write(JmeExporter ex) throws IOException { OutputCapsule oc = ex.getCapsule(this); for (Map.Entry<VertexBuffer.Type, FloatBuffer> entry : buffers.entrySet()) { Buffer roData = entry.getValue().asReadOnlyBuffer(); oc.write((FloatBuffer) roData, entry.getKey().name(),null); } }
loc = gl.glGetAttribLocation(context.boundShaderProgram, "in" + vb.getBufferType().name());
stringBuf.append("in").append(vb.getBufferType().name()).append('\0'); updateNameBuffer(); loc = glGetAttribLocation(programId, nameBuf);
loc = gl.glGetAttribLocation(context.boundShaderProgram, "in" + vb.getBufferType().name());
public Attribute getAttribute(VertexBuffer.Type attribType){ int ordinal = attribType.ordinal(); Attribute attrib = attribs.get(ordinal); if (attrib == null){ attrib = new Attribute(); attrib.name = attribType.name(); attribs.put(ordinal, attrib); } return attrib; }
@Override public String toString(){ String dataTxt = null; if (data != null){ dataTxt = ", elements="+data.limit(); } return getClass().getSimpleName() + "[fmt="+format.name() +", type="+bufType.name() +", usage="+usage.name() +dataTxt+"]"; }
public Attribute getAttribute(VertexBuffer.Type attribType){ int ordinal = attribType.ordinal(); Attribute attrib = attribs.get(ordinal); if (attrib == null){ attrib = new Attribute(); attrib.name = attribType.name(); attribs.put(ordinal, attrib); } return attrib; }
@Override public String toString(){ String dataTxt = null; if (data != null){ dataTxt = ", elements="+data.capacity(); } return getClass().getSimpleName() + "[fmt="+format.name() +", type="+bufType.name() +", usage="+usage.name() +dataTxt+"]"; }
public Attribute getAttribute(VertexBuffer.Type attribType){ int ordinal = attribType.ordinal(); Attribute attrib = attribs.get(ordinal); if (attrib == null){ attrib = new Attribute(); attrib.name = attribType.name(); attribs.put(ordinal, attrib); } return attrib; }
@Override public void read(JmeImporter im) throws IOException { InputCapsule ic = im.getCapsule(this); for (VertexBuffer.Type type : VertexBuffer.Type.values()) { FloatBuffer b = ic.readFloatBuffer(type.name(), null); if(b!= null){ setBuffer(type, b); } } } }