picogl.backend.gl.api.buffer.check_is

gl bind buffer wrapper

Functions

buffer_name(handle) → int

Return a GL buffer name as a Python int.

gl_is_buffer(handle) → Any

Return whether handle is a buffer object in the current context.

Module Contents

picogl.backend.gl.api.buffer.check_is.buffer_name(handle: Any) → int[source]

Return a GL buffer name as a Python int.

glGenBuffers(1) returns a length-1 array. Passing that array through to glIsBuffer does not name the buffer, so a later unbind reports the handle as invalid.

Parameters:

handle – Buffer name, or None

Returns:

Name, or 0 when handle is empty

picogl.backend.gl.api.buffer.check_is.gl_is_buffer(handle: Any) → Any[source]

Return whether handle is a buffer object in the current context.