psychopy.tools.gltools.useProgramObjectARB

psychopy.tools.gltools.useProgramObjectARB(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 linkProgramObjectARB() or glLinkProgramObjectARB.

Parameters

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

Examples

Install a program for use in the current rendering state:

useProgramObjectARB(myShader)

Disable the current shader program by specifying 0:

useProgramObjectARB(0)

Notes

Some drivers may support using glUseProgram for objects created by calling createProgramObjectARB() or glCreateProgramObjectARB.


Back to top