Reference Codebot.Render.Shaders.pas
Part of the Codebot Render package
The Codebot.Render.Shaders unit compiles and links OpenGL shaders. TVertexShader and TFragmentShader compile a shader from source, and TShaderProgram links the two together into a program you draw with. ErrorString tells you what went wrong when a shader doesn't compile or link. If your source has no #version directive, one is added to match the OpenGL version chosen in render.inc.
Ctx.Shaders holds shader programs by name, loading name.vert and name.frag from the shaders folder of your assets.
Items 35 items
| Name | Kind | Line |
|---|---|---|
| ShadowLighting | constant | 154 |
| ShadowPrecision | constant | 147 |
| ShadowSamples | constant | 148 |
| TFragmentShader | class | 60 |
| Create | constructor | 62 |
| TShaderCollection | class | 102 |
| Create | constructor | 107 |
| Prog | property | 111 |
| Source | property | 109 |
| TShaderExtension | helper | 116 |
| Shaders | function | 119 |
| TShaderObject | class | 16 |
| Create | constructor | 23 |
| ErrorObject | property | 28 |
| ErrorString | property | 26 |
| Handle | property | 32 |
| Valid | property | 30 |
| TShaderProgram | class | 67 |
| Attach | procedure | 90 |
| Create | constructor | 75 |
| CreateFromAsset | constructor | 79 |
| CreateFromFile | constructor | 81, 83 |
| CreateFromSource | constructor | 77 |
| Destroy | destructor | 84 |
| Link | function | 92 |
| Pop | procedure | 88 |
| Push | procedure | 86 |
| UpdateMatrix | procedure | 94 |
| Active | property | 96 |
| TShaderSource | class | 37 |
| Compile | function | 46 |
| Destroy | destructor | 42 |
| Source | property | 48 |
| TVertexShader | class | 53 |
| Create | constructor | 55 |