public Void call() throws Exception { getRenderer().getShaderUtils().deleteVertexArrays(idMap.get(ref)); return null; } });
public Void call() throws Exception { getRenderer().getShaderUtils().deleteBuffers(idMap.get(glref)); return null; } });
protected void setupUniforms(final Renderer renderer, final Mesh mesh) { final RenderContext context = ContextManager.getCurrentContext(); final IShaderUtils shaderUtils = renderer.getShaderUtils(); final int programId = getProgramId(context); for (int i = 0; i < _uniforms.size(); i++) { setupUniform(mesh, shaderUtils, programId, _uniforms.get(i), ""); } }
protected void startPass(final Renderer renderer) { final RenderContext context = ContextManager.getCurrentContext(); // Make sure we have a program id int id = getProgramId(context); if (id <= 0) { // No valid id. Check our shader objects have ids and package them into a new program id = renderer.getShaderUtils().createShaderProgram(_shaders, context); setProgramId(context, id); } renderer.getShaderUtils().useShaderProgram(id, context); }
/** * Handle cleanup of all open OpenGL assets. This method is meant to be used on application shutdown. * * @param renderer * an optional Renderer to use for immediate cleanup when the asset is owned by the current context. In * general this is best used in single context applications, and null is a perfectly acceptable value. * However, if there is more than one context or null was passed, you must have all of the contexts * process at least one more (empty) frame to allow for the final gl calls to be processed. */ public static void doFinalCleanup(final Renderer renderer) { TextureManager.cleanAllTextures(renderer.getTextureUtils(), null); AbstractBufferData.cleanAllBuffers(renderer.getShaderUtils()); MeshData.cleanAllVertexArrays(renderer.getShaderUtils()); } }
/** * Handle detecting and scheduling cleanup of OpenGL assets. This method will place delete calls on the task queue * of appropriate RenderContexts when an asset such as a Texture is determined to no longer be reachable by Java. * * @param renderer * an optional Renderer to use for immediate cleanup when the asset is owned by the current context. In * general this is best used in single context applications, and null is a perfectly acceptable value. */ public static void doRuntimeCleanup(final Renderer renderer) { TextureManager.cleanExpiredTextures(renderer.getTextureUtils(), null); AbstractBufferData.cleanExpiredVBOs(renderer.getShaderUtils()); }
final IShaderUtils shaderUtils = renderer.getShaderUtils(); int vaoID = data.getVAOID(context); if (vaoID <= 0) {