Module LuaVBO
See also:
Functions
Functions
gl.GetVBO([bufferType=GL.ARRAY_BUFFER[, freqUpdated=true]])
Parameters:
-
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, andGL.ELEMENT_ARRAY_BUFFER
should be used for vertex indices. (default GL.ARRAY_BUFFER) -
freqUpdated
bool whether should be updated frequently, when false will be updated only once (default true)
Returns:
- 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