find out how many texture units ... ?

Started by
2 comments, last by Alph@1 15 years, 8 months ago
I want to find out how many texture units are supported by OpenGL implementation, so i write a program like this:

#include<windows.h>
#include<iostream.h>
#include<gl\gl.h>
#include<gl\glu.h>
#include<gl\glut.h>

void main()
{
	int mm;
	glGetIntegerv(GL_MAX_TEXTURE_UNITS,&mm);
	cout <<"mm = " << mm << endl;
}
but when i compiled i received the error message: error C2065: 'GL_MAX_TEXTURE_UNITS' : undeclared identifier i'm using VC6++ now. I really don't know that ! help me !!!
Advertisement
GL_MAX_TEXTURE_UNITS is defined in glext.h, you can download the extension header files from here:
http://www.opengl.org/registry/
Also, that won't work. You need to have created a valid OpenGL context (ie. display) before gl commands will work.
thanks !!!

This topic is closed to new replies.

Advertisement