Module LuaVBO


See also:

Functions

gl.GetVBO

Functions

gl.GetVBO([bufferType=GL.ARRAY_BUFFER[, freqUpdated=true]])

Parameters:

  1. bufferType number one of [GL.ARRAY_BUFFER, GL.ELEMENT_ARRAY_BUFFER, GL.UNIFORM_BUFFER, GL.SHADER_STORAGE_BUFFER].

    Defaults to GL.ARRAY_BUFFER, which you should use for vertex data, and GL.ELEMENT_ARRAY_BUFFER should be used for vertex indices. (default GL.ARRAY_BUFFER)

  2. freqUpdated bool whether should be updated frequently, when false will be updated only once (default true)

Returns:

  1. nil or VBO the VBO ref on success, nil if not supported/or other error

See also:

Usage:

  • local myVBO = gl.GetVBO()
    if myVBO == nil then Spring.Echo("Failed to get VBO") end