Skip to content

functions that get pointers to variables don't modify the variables #539

@abirvalarg

Description

@abirvalarg
unsafe {
  let mut vao = 0;
  gl::GenVertexArrays(1, &mut vao);
  assert!(vao != 0);
}

this code panics. But if i change the initial value of vao to anything else(for example 1), it doesn't panic. Similar thing with other functions that get pointers as arguments, they don't seem to modify anything so i can't create any objects or get error logs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions