Skip to content

Checking if the resource is belong to the context #22

@tim37021

Description

@tim37021

It seems the library does not check if the object is belong to the context.
GL::Context& gl = window.GetContext();
GL::VertexBuffer vbo(vertices, sizeof(vertices), GL::BufferUsage::StaticDraw);
GL::VertexArray vao;
vao.BindAttribute(program.GetAttribute("position"), vbo, GL::Type::Float, 2, 0, 0);
gl.DrawArrays(vao, GL::Primitive::Triangle, 0, 3);

I suggest making DrawArray a static method in Context.

And it is not safe if I directly copy one texture from another context.
Texture contextATexture=contextBTexture;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions