public ShaderProgram getShaderProgram(Object key) { // TODO redesign ShaderProgram to operate as a resource accessible from DrawContext // TODO created automatically on OpenGL thread, unless the caller wants to explicitly create a program return (ShaderProgram) this.renderResourceCache.get(key); }
public BufferObject getBufferObject(Object key) { return (BufferObject) this.renderResourceCache.get(key); }
public Texture getTexture(ImageSource imageSource) { return (Texture) this.renderResourceCache.get(imageSource); }
public Texture getText(String text, TextAttributes attributes) { TextCacheKey key = this.scratchTextCacheKey.set(text, attributes); return (Texture) this.renderResourceCache.get(key); }