Castle Game Engine: CastleRenderer: Class TGLRendererContextCache

# Class TGLRendererContextCache
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleRenderer ## Declaration `type TGLRendererContextCache = class(TObject)` ## Description A cache that may be used by many TGLRenderer instances to share some common OpenGL resources. For examples, texture names. Such things can usually be shared by all TGLRenderer instances used within the same OpenGL context. And this may save a lot of memory if you use many TGLRenderer instances in your program. Instance of this class is tied to particular OpenGL context if and only if there are some TGLRenderer instances using this cache and tied to that OpenGL context. ## Hierarchy TObject TGLRendererContextCache ## Overview ### Methods
| `constructor Create;`
| `destructor Destroy; override;`
| `function Fonts_IncReference( fsfam: TX3DFontFamily; fsbold: boolean; fsitalic: boolean; Font: TOutlineFont): TGLOutlineFont;`
| `procedure Fonts_DecReference( fsfam: TX3DFontFamily; fsbold: boolean; fsitalic: boolean);`
| `function Shape_IncReference(Shape: TX3DRendererShape; Fog: IAbstractFogObject; ARenderer: TGLRenderer): TShapeCache;`
| `procedure Shape_DecReference(var ShapeCache: TShapeCache);`
| `function Program_IncReference(ARenderer: TGLRenderer; Shader: TShader; const ShapeNiceName: string): TShaderProgramCache;`
| `procedure Program_DecReference(var ProgramCache: TShaderProgramCache);`
## Description ### Methods
| `constructor Create;`
| `destructor Destroy; override;`
| `function Fonts_IncReference( fsfam: TX3DFontFamily; fsbold: boolean; fsitalic: boolean; Font: TOutlineFont): TGLOutlineFont;`
| `procedure Fonts_DecReference( fsfam: TX3DFontFamily; fsbold: boolean; fsitalic: boolean);`
| `function Shape_IncReference(Shape: TX3DRendererShape; Fog: IAbstractFogObject; ARenderer: TGLRenderer): TShapeCache;`
Shape cache. We return TShapeCache, either taking an existing instance from cache or creating and adding a new one. Caller is responsible for checking are Arrays / Vbo zero and eventually initializing and setting.
| `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.
| `procedure Program_DecReference(var ProgramCache: TShaderProgramCache);`
Generated by PasDoc 0.13.0 on 2013-08-17 21:27:13