pub fn new(res: &Resources) -> Result<Self> {
        // set up shader program
        let program = render_gl::Program::from_res(res, SHADER_PATH)?;

        let vbo = buffer::ArrayBuffer::new();
        vbo.bind();

        // set up vertex array object
        let vao = buffer::VertexArray::new();
        vao.bind();
        Vertex::vertex_attrib_pointers();

        // indices buffer
        let ibo = buffer::ElementArrayBuffer::new();
        ibo.bind();

        let texture = buffer::Texture::new(TEXTURE_UNIT);
        texture.bind();
        texture.unbind();
        ibo.unbind();
        vao.unbind();
        vbo.unbind();

        Ok(Self {
            ibo,
            program,
            texture,
            vao,
            vbo,
        })
    }
/// Initializes [UIRenderer], compiling shaders and initializing buffers.
Initializes [UIRenderer], compiling shaders and initializing buffers.
Initializes [ UIRenderer ] compiling shaders and initializing buffers .
pub fn new(res: &Resources) -> Result<Self> {
        // set up shader program
        let program = render_gl::Program::from_res(res, SHADER_PATH)?;
        let vbo = buffer::ArrayBuffer::new();
        vbo.bind();
        // set up vertex array object
        let vao = buffer::VertexArray::new();
        vao.bind();
        Vertex::vertex_attrib_pointers();
        // indices buffer
        let ibo = buffer::ElementArrayBuffer::new();
        ibo.bind();
        let texture = buffer::Texture::new(TEXTURE_UNIT);
        texture.bind();
        texture.unbind();
        ibo.unbind();
        vao.unbind();
        vbo.unbind();
        Ok(Self {
            ibo,
            program,
            texture,
            vao,
            vbo,
        })
    }
pub fn new ( res : & Resources ) -> Result < Self > { // set up shader program let program = render_gl :: Program :: from_res ( res , SHADER_PATH ) ? ; let vbo = buffer :: ArrayBuffer :: new ( ) ; vbo . bind ( ) ; // set up vertex array object let vao = buffer :: VertexArray :: new ( ) ; vao . bind ( ) ; Vertex :: vertex_attrib_pointers ( ) ; // indices buffer let ibo = buffer :: ElementArrayBuffer :: new ( ) ; ibo . bind ( ) ; let texture = buffer :: Texture :: new ( TEXTURE_UNIT ) ; texture . bind ( ) ; texture . unbind ( ) ; ibo . unbind ( ) ; vao . unbind ( ) ; vbo . unbind ( ) ; Ok ( Self { ibo , program , texture , vao , vbo , } ) }
Initializes [UIRenderer], compiling shaders and initializing buffers.
Initializes [ UIRenderer ] compiling shaders and initializing buffers .
res
&Resources
res
&Resources