ComputeShaderExists

Family: Compute · One form

What it does

ComputeShaderExists answers a question: whether a Compute object still exists. It takes shaderID (an integer), and answers an integer. shaderID is the id of a Shader object, obtained elsewhere in the Compute family.

Syntax

ComputeShaderExists(shaderID integer) → integer

Parameters

NameType
shaderIDinteger

Every form returns

integer

Example · generated

shader = CreateComputeShader("@compute fn main() {}", "{}")DO  Print(ComputeShaderExists(shader))  Sync()LOOP

CreateComputeShader is there to give the call something to act on; ComputeShaderExists is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

14 commands in Compute