public static void InitializeResources() { ColorShader = ProgramFactory.Create <ColorShaderProgram>(); WireframeShader = ProgramFactory.Create <WireframeShaderProgram>(); ModelShader = ProgramFactory.Create <ModelShaderProgram>(); ModelShader.Use(); ModelShader.LightCount.Set(0); ModelShader.Lights.Set(new LightInfo[0]); WireframeShader2 = ProgramFactory.Create <WireframeShader2Program>(); StudConnectionShader = ProgramFactory.Create <StudConnectionShaderProgram>(); SimpleTextureShader = ProgramFactory.Create <SimpleTextureShaderProgram>(); GridShader = ProgramFactory.Create <GridShaderProgram>(); }
public static void ReleaseResources() { if (ColorShader != null) { ColorShader.Dispose(); ColorShader = null; } if (WireframeShader != null) { WireframeShader.Dispose(); WireframeShader = null; } if (WireframeShader2 != null) { WireframeShader2.Dispose(); WireframeShader2 = null; } if (ModelShader != null) { ModelShader.Dispose(); ModelShader = null; } if (StudConnectionShader != null) { StudConnectionShader.Dispose(); StudConnectionShader = null; } if (SimpleTextureShader != null) { SimpleTextureShader.Dispose(); SimpleTextureShader = null; } if (GridShader != null) { GridShader.Dispose(); GridShader = null; } }