psychopy.tools.gltools.useProgram

psychopy.tools.gltools.useProgram(program)[source]

Use a program object’s executable shader attachments in the current OpenGL rendering state.

In order to install the program object in the current rendering state, a program must have been successfully linked by calling linkProgram() or glLinkProgram.

Parameters

program (int) – Handle of program to use. Must have originated from a createProgram() or glCreateProgram call and was successfully linked. Passing 0 or None disables shader programs.

Examples

Install a program for use in the current rendering state:

useProgram(myShader)

Disable the current shader program by specifying 0:

useProgram(0)

Back to top