Documentation de Gambas - /comp/gb.opengl.glsl/gl/loadname

/comp/gb.opengl.glsl/gl/loadname

# Gl.LoadName (gb.opengl)

Static Sub LoadName ( Name As Integer )

Load a name onto the name stack.

### Parameters

name

  Specifies a name that will replace the top value on the name stack.

### Description

The name stack is used during selection mode to allow sets of rendering commands to be uniquely identified. It consists of an ordered set of unsigned integers and is initially empty.

Gl.LoadName causes name to replace the value on the top of the name stack.

The name stack is always empty while the render mode is not Gl.SELECT. Calls to Gl.LoadName while the render mode is not Gl.SELECT are ignored.

### Errors

Gl.INVALID_OPERATION is generated if Gl.LoadName is called while the name stack is empty.

Gl.INVALID_OPERATION is generated if Gl.LoadName is executed between the execution of Gl.Begin and the corresponding execution of Gl.End.

### Associated Gets

Gl.Get with argument Gl.NAME_STACK_DEPTH

Gl.Get with argument Gl.MAX_NAME_STACK_DEPTH

### See also

- Gl.InitNames,

- Gl.PushName,

- Gl.RenderMode,

Gl.SelectBuffer

See original documentation on OpenGL website