/// <inheritdoc /> public void Load() { ThrowIfDisposed(); if (program == null) { lock (ProgramStateLock) { if (program == null) { program = programBuilder.Build(); programBuilder = null; } } } this.vertexArrayObject = (GlVertexArrayObject <Vertex>) this.vertexArrayObjectBuilder.Build(); this.vertexArrayObjectBuilder = null; }
/// <inheritdoc /> public void Load() { ThrowIfDisposed(); this.textures = new int[1]; this.textures[0] = Path.GetExtension(textureFilePath) == ".DDS" ? TextureLoader.LoadDDS(textureFilePath) : TextureLoader.LoadBMP(textureFilePath); if (program == null) { lock (ProgramStateLock) { if (program == null) { program = programBuilder.Build(); programBuilder = null; } } } this.vertexArrayObject = (GlVertexArrayObject <Vertex>) this.vertexArrayObjectBuilder.Build(); this.vertexArrayObjectBuilder = null; }