/** * Marks the indices as dirty in this MeshData. Also calls {@link #markBuffersDirty()} * * @throws Ardor3DException * if buffer is not found */ public void markIndicesDirty() { final AbstractBufferData<?> data = getIndices(); data.markDirty(); markBuffersDirty(); }
/** * Mark a specific data buffer as dirty in this MeshData. Also calls {@link #markBuffersDirty()} * * @param key * the key of the buffer to mark dirty. * @throws Ardor3DException * if buffer is not found */ public void markBufferDirty(final String key) { final AbstractBufferData<?> data = getCoords(key); if (data == null) { throw new Ardor3dException("Buffer not found: " + key); } data.markDirty(); markBuffersDirty(); }
public static void cleanAllBuffers(final IShaderUtils utils) { final Multimap<RenderContextRef, Integer> idMap = ArrayListMultimap.create(); // gather up expired vbos... these don't exist in our cache gatherGCdIds(idMap); // Walk through the cached items and delete those too. for (final AbstractBufferData<?> buf : _identityCache.keySet()) { if (buf._bufferIdCache != null) { if (Constants.useMultipleContexts) { final Set<RenderContextRef> contextObjects = buf._bufferIdCache.getContextRefs(); for (final RenderContextRef o : contextObjects) { // Add id to map idMap.put(o, buf.getBufferIdByRef(o)); } } else { idMap.put(ContextManager.getCurrentContext().getGlContextRef(), buf.getBufferIdByRef(null)); } buf._bufferIdCache.clear(); buf.markDirty(); } } handleVBODelete(utils, idMap); }