Class TGLMemoryInfo

Unit

Declaration

type TGLMemoryInfo = class(TObject)

Description

OpenGL memory information.

Information comes from either

See the respective extension documentation for more information.

As the two extensions (NVidia and AMD) expose somewhat different information, we do not try to present "uniform" API that hides their differences (because it seems we cannot). Simply be prepared that some sets of fields below will be always zero.

Hierarchy

  • TObject
  • TGLMemoryInfo

Overview

Fields

Public DedicatedVideoMemory: TGLint;
Public TotalAvailableMemory: TGLint;
Public CurrentAvailableVideoMemory: TGLint;
Public VboFreeMemory: TGLint;
Public TextureFreeMemory: TGLint;
Public RenderbufferFreeMemory: TGLint;

Methods

Public constructor Create;
Public procedure Refresh;
Public function LessTextureMemoryThan(const RequiredMemoryKb: Integer): Boolean;

Description

Fields

Public DedicatedVideoMemory: TGLint;

Dedicated video memory, total size (in kb) of the GPU memory.

Zero if unknown. Available only on (some) NVidia GPUs.

Public TotalAvailableMemory: TGLint;

Total available memory, total size (in Kb) of the memory available for allocations.

Zero if unknown. Available only on (some) NVidia GPUs.

Public CurrentAvailableVideoMemory: TGLint;

Currently available dedicated video memory (in kb), currently unused GPU memory.

Zero if unknown. Available only on (some) NVidia GPUs.

Public VboFreeMemory: TGLint;

Current memory free for a particular feature, in Kb.

Zero if unknown. Available only on (some) AMD GPUs.

Public TextureFreeMemory: TGLint;

Current memory free for a particular feature, in Kb.

Zero if unknown. Available only on (some) AMD GPUs.

Public RenderbufferFreeMemory: TGLint;

Current memory free for a particular feature, in Kb.

Zero if unknown. Available only on (some) AMD GPUs.

Methods

Public constructor Create;

This item has no description.

Public procedure Refresh;

This item has no description.

Public function LessTextureMemoryThan(const RequiredMemoryKb: Integer): Boolean;

Detect GPUs with low texture memory. Looks at CurrentAvailableVideoMemory or CurrentTexture, whichever is available.

This is useful to detect at runtime when to use e.g. compressed textures (S3TC and such) or downscaled textures (using GLTextureScale or TextureLoadingScale).


Generated by PasDoc 0.16.0-snapshot.