Class TGLRendererContextCache
Unit
CastleRenderer
Declaration
type TGLRendererContextCache = class(TObject)
Description
Cache used by TGLRenderer instances to share OpenGL resources, like textures. This may save a lot of OpenGL memory when you use multiple renderers (for example, multiple TCastleScene instances).
The cache can only be shared by renderers in the same OpenGL context, or in shared OpenGL contexts. It cannot be reused in totally alien OpenGL contexts, as the OpenGL identifiers will simply not exist there. In practice, this should not be a problem, as our OpenGL contexts always share resources, and you will almost always just use a single instance of this cache inside GLContextCache.
Hierarchy
- TObject
- TGLRendererContextCache
Overview
Methods
Description
Methods
 |
constructor Create; |
|
 |
destructor Destroy; override; |
|
 |
procedure Shape_DecReference(var ShapeCache: TShapeCache); |
|
 |
function Program_IncReference(ARenderer: TGLRenderer; Shader: TShader; const ShapeNiceName: string): TShaderProgramCache; |
Shader program cache. We return TShaderProgramCache, either taking an existing instance from cache or creating and adding a new one. If we create a new one, we will use Shader to initialize program hash and to create and link actual TX3DGLSLProgram instance.
|
Generated by PasDoc 0.14.0.
|