Class TGLRendererContextCache

DescriptionHierarchyFieldsMethodsProperties

Unit

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

Public constructor Create;
Public destructor Destroy; override;
Public function Fonts_IncReference( fsfam: TX3DFontFamily; fsbold: boolean; fsitalic: boolean; Font: TOutlineFont): TGLOutlineFont;
Public procedure Fonts_DecReference( fsfam: TX3DFontFamily; fsbold: boolean; fsitalic: boolean);
Public function Shape_IncReference(Shape: TX3DRendererShape; Fog: IAbstractFogObject; ARenderer: TGLRenderer): TShapeCache;
Public procedure Shape_DecReference(var ShapeCache: TShapeCache);
Public function Program_IncReference(ARenderer: TGLRenderer; Shader: TShader; const ShapeNiceName: string): TShaderProgramCache;
Public procedure Program_DecReference(var ProgramCache: TShaderProgramCache);

Description

Methods

Public constructor Create;
 
Public destructor Destroy; override;
 
Public function Fonts_IncReference( fsfam: TX3DFontFamily; fsbold: boolean; fsitalic: boolean; Font: TOutlineFont): TGLOutlineFont;
 
Public procedure Fonts_DecReference( fsfam: TX3DFontFamily; fsbold: boolean; fsitalic: boolean);
 
Public 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.

Public procedure Shape_DecReference(var ShapeCache: TShapeCache);
 
Public 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.

Public procedure Program_DecReference(var ProgramCache: TShaderProgramCache);
 

Generated by PasDoc 0.12.1 on 2013-02-04 20:26:51