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

Name Description
Class EGLSLError Common class for exceptions related to GLSL programs.
Class EGLSLShaderCompileError  
Class EGLSLProgramLinkError  
Class EGLSLAttributeNotFound  
Class EGLSLTransformFeedbackError  
Record TGLSLUniform  
Record TGLSLAttribute  
Class TGLSLProgram Easily handle program in GLSL (OpenGL Shading Language).

Functions and Procedures

function GetCurrentProgram: TGLSLProgram; deprecated 'use RenderContext.CurrentProgram';
procedure SetCurrentProgram(const Value: TGLSLProgram); deprecated 'use RenderContext.CurrentProgram';

Types

TGLuintList = TCardinalList;
TGLSLAttributeList = specialize TList<TGLSLAttribute>;
TLocationCache = specialize TDictionary<String, TGLint>;
TGLSLProgramList = specialize TObjectList<TGLSLProgram>;

Variables

LogShaders: boolean;
property CurrentProgram: TGLSLProgram read GetCurrentProgram write SetCurrentProgram;

Description

Functions and Procedures

function GetCurrentProgram: TGLSLProgram; deprecated 'use RenderContext.CurrentProgram';

Warning: this symbol is deprecated: use RenderContext.CurrentProgram

This item has no description.

procedure SetCurrentProgram(const Value: TGLSLProgram); deprecated 'use RenderContext.CurrentProgram';

Warning: this symbol is deprecated: use RenderContext.CurrentProgram

This item has no description.

Types

TGLuintList = TCardinalList;

This item has no description.

TGLSLAttributeList = specialize TList<TGLSLAttribute>;

This item has no description.

TLocationCache = specialize TDictionary<String, TGLint>;

This item has no description.

TGLSLProgramList = specialize TObjectList<TGLSLProgram>;

This item has no description.

Variables

LogShaders: boolean;

This item has no description.

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.