What it does
LoadSpriteShader writes to a 3D object: it loads rather than reads. It takes szPixelFile (a string), and answers an integer. That is the first of 2 forms.
Syntax
1
LoadSpriteShader(szPixelFile string) → integer2
LoadSpriteShader(shaderID integer, szPixelFile string)Parameters
| Name | Type | In forms |
|---|---|---|
| szPixelFile | string | all |
| shaderID | integer | 2 |
What each form returns
| 1 | spriteShader = LoadSpriteShader("assets/model.obj") | integer |
| 2 | LoadSpriteShader(1, "assets/model.obj") | nothing |
Example · generated
Form 1, the command hands back the id
spriteShader = LoadSpriteShader("assets/model.obj")DO Sync()LOOPForm 2, you choose the id yourself
LoadSpriteShader(1, "assets/model.obj")DO Sync()LOOPLoadSpriteShader is called and its answer is printed every frame. 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.