1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#include "ati_meminfo.h"
#include <stdio.h>
#include <GL/glut.h>
#define VBO_FREE_MEMORY_ATI 0x87FB
#define TEXTURE_FREE_MEMORY_ATI 0x87FC
#define RENDERBUFFER_FREE_MEMORY_ATI 0x87FD
void
ati_meminfo (void)
{
GLint param[4];
glGetIntegerv (VBO_FREE_MEMORY_ATI, param);
printf ("VBO_FREE_MEMORY_ATI\n");
printf (" Total memory free in the pool: %i Kbyte\n", param[0]);
printf (" Largest available free block in the pool: %i Kbyte\n", param[1]);
printf (" Total auxiliary memory free: %i Kbyte\n", param[2]);
printf (" Largest auxiliary free block: %i Kbyte\n", param[3]);
printf ("\n");
glGetIntegerv (TEXTURE_FREE_MEMORY_ATI, param);
printf ("TEXTURE_FREE_MEMORY_ATI\n");
printf (" Total memory free in the pool: %i Kbyte\n", param[0]);
printf (" Largest available free block in the pool: %i Kbyte\n", param[1]);
printf (" Total auxiliary memory free: %i Kbyte\n", param[2]);
printf (" Largest auxiliary free block: %i Kbyte\n", param[3]);
printf ("\n");
glGetIntegerv (RENDERBUFFER_FREE_MEMORY_ATI, param);
printf ("RENDERBUFFER_FREE_MEMORY_ATI\n");
printf (" Total memory free in the pool: %i Kbyte\n", param[0]);
printf (" Largest available free block in the pool: %i Kbyte\n", param[1]);
printf (" Total auxiliary memory free: %i Kbyte\n", param[2]);
printf (" Largest auxiliary free block: %i Kbyte\n", param[3]);
printf ("\n");
return;
}
|