Unit CastleGLShaders
Description
OpenGL shaders in GLSL language.
Creating/destroying the TGLSLProgram instance immediately creates/destroys appropriate program on GPU. So be sure to create/destroy it only when you have OpenGL context available (for example, create in TCastleWindow.OnOpen and destroy in TCastleWindow.OnClose).
Upon creation, we check current OpenGL context abilities. Currently three support levels are possible: no support at all (old OpenGL), support through ARB extensions, or support built-in (newer OpenGL versions, >= 2.0).
All three cases are automatically handled inside, so usually you do not have to care about these details. Note that "none" support (on older OpenGL version with no appropriate ARB extensions) means that shaders are not really initialized at all.
Uses
Overview
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Variables
Description
Functions and Procedures
function GetCurrentProgram: TGLSLProgram; deprecated 'use RenderContext.CurrentProgram'; |
Warning: this symbol is deprecated: use RenderContext.CurrentProgram |
procedure SetCurrentProgram(const Value: TGLSLProgram); deprecated 'use RenderContext.CurrentProgram'; |
Warning: this symbol is deprecated: use RenderContext.CurrentProgram |
Types
TLocationCache = specialize TDictionary<String, TGLint>; |
|
Variables
property CurrentProgram: TGLSLProgram
read GetCurrentProgram write SetCurrentProgram; |
Warning: this symbol is deprecated.
Currently enabled GLSL program. Nil if fixed-function pipeline should be used. Setting this property encapsulates the OpenGL glUseProgram (or equivalent ARB extension), additionally preventing redundant glUseProgram calls.
Use RenderContext.CurrentProgram
|
Generated by PasDoc 0.16.0.