Skip to content

RAM usage logging

Adam Gorski edited this page Jul 5, 2021 · 1 revision

Reading RAM Usage

You can read the RAM usage every GLBuffer and GLTexture use by using the static method in the GLTexture/GLBuffer classes or by using the GLInfo class.

Reading GLBuffer RAM usage

To read the RAM usage of all GLBuffers created, you can use the TotalRAMUsage properties:

int bytes = GLBuffer.TotalRAMUsage;
int Mbytes = GLBuffer.TotalRAMUsageMB;

Reading GLTexture RAM usage

To read the RAM usage of all GLTextures created, you can use the TotalRAMUsage properties:

int bytes = GLTexture.TotalRAMUsage;
int Mbytes = GLTexture.TotalRAMUsageMB;

Reading Total RAM usage

To read the RAM usage of all every XFCore buffer created, you will first need the xfcore.Info namespace:

using xfcore.Info;

Then you can access this info the same way the GLTexture and GLBuffer RAM usage was accessed.

int bytes = GLInfo.RAMUsage;
int Mbytes = GLInfo.RAMUsageMB;