/// <summary> /// /// </summary> /// <returns></returns> public ShaderProgram GetProgram() { if (this.program == null) { this.program = ShaderCodesHelper.CreateProgram(shaderCodes); } return(this.program); }
/// <summary> /// /// </summary> /// <param name="indexBuffer"></param> /// <param name="vertexBuffers"></param> /// <returns></returns> public VertexArrayObject GetVertexArrayObject(IndexBuffer indexBuffer, VertexBuffer[] vertexBuffers) { if (this.vertexArrayObject == null) { if (this.program == null) { this.program = ShaderCodesHelper.CreateProgram(shaderCodes); } this.vertexArrayObject = new VertexArrayObject(indexBuffer, vertexBuffers); this.vertexArrayObject.Initialize(this.program); } return(this.vertexArrayObject); }