Class TGLImageOnDemand

Unit

Declaration

type TGLImageOnDemand = class(TGLImageCore)

Description

Image ready to be drawn on 2D screen, loaded on demand.

The image is loaded from disk on demand (only once needed), and the OpenGL resources are also initilized on demand. This is very efficient for memory usage, but the catch is that even the image sizes are not known before the image will be loaded (which will happen at nearest draw, or when you explicitly call PrepareResources).

Like TGLImage, this image instance can be created and destroyed at any moment (no need to worry about whether OpenGL context is created), and an instance can survive OpenGL context close + open.

Hierarchy

Overview

Methods

Public constructor Create(const AURL: string; const ASmoothScaling: boolean = true); overload;
Public destructor Destroy; override;
Public procedure PrepareResources; override;
Public procedure Draw(ScreenRects, ImageRects: PFloatRectangleArray; const Count: Integer); override;

Description

Methods

Public constructor Create(const AURL: string; const ASmoothScaling: boolean = true); overload;
 
Public destructor Destroy; override;
 
Public procedure PrepareResources; override;
 
Public procedure Draw(ScreenRects, ImageRects: PFloatRectangleArray; const Count: Integer); override;
 

Generated by PasDoc 0.15.0.