Shows simple usage of the ATI_meminfo extensionCopyright 2008-2014 Matus Chochlik. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <cassert>
#include <iostream>
#include <GL/glew.h>
#include <GL/glut.h>
int main(int argc, char* argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
glutInitWindowSize(800, 600);
glutInitWindowPosition(100,100);
glutCreateWindow("OGLplus+GLUT+GLEW");
if(glewInit() == GLEW_OK) try
{
glGetError();
};
const char* name[3] = {
"VBO",
"Texture",
"Renderbuffer"
};
for(int i=0; i!=3; ++i)
{
std::cout << name[i] << " Free Memory:" <<
std::endl;
std::cout << " Total: " <<
std::endl;
std::cout << " Largest block: " <<
std::endl;
std::cout << " Total aux: " <<
std::endl;
std::cout << " Largest aux block: " <<
std::endl;
std::cout << std::endl;
}
return 0;
}
{
std::cerr
<< "Error (in "
<< "'): "
<< err.what()
<< " ["
<< ":"
<< "] "
<< std::endl;
}
return 1;
}