void Closing() { brickTexture.Dispose(); mossTexture.Dispose(); shaderProgramTextured.Dispose(); shaderProgramColored.Dispose(); shaderProgram.Dispose(); vb1.Dispose(); vb2.Dispose(); vb3.Dispose(); renderer.Dispose(); }
private void CheckShaderReload() { if (!needShaderReload) { return; } needShaderReload = false; try { if (!ReferenceEquals(defaultShader, shader)) { shader.Dispose(); } shader = ShaderLoader.CreateFromStrings(DefaultShaderSourceCode.Quad, ShaderSourceCode); ShaderLog = string.Empty; } catch (ShaderException e) { ShaderLog = e.Message; shader = defaultShader; } uniformSetters.Clear(); //uniform locations may have changed, so old setters are invalid }
/// <summary> /// Will be called from the default Dispose method. /// </summary> protected override void DisposeResources() { shaderProgram.Dispose(); }
public void Dispose() { capi.Render.DeleteMesh(quadRef); overlayShaderProg.Dispose(); }
public void Dispose() { capi.Render.DeleteMesh(quadRef); exitHelpTexture?.Dispose(); eyeShaderProg.Dispose(); }
public void Dispose() { capi?.Event.UnregisterRenderer(this, EnumRenderStage.Ortho); prog?.Dispose(); quadRef?.Dispose(); }