summaryrefslogtreecommitdiffstats
path: root/progs/demos/multiarb.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-11-01 16:02:01 +0000
committerBrian Paul <[email protected]>2000-11-01 16:02:01 +0000
commit563d26b247395c1eaf0780a2b7536c52ceea9cc1 (patch)
tree4e8eae6221614fe2153237ec29d332534e69374d /progs/demos/multiarb.c
parentb35ec1ca05faa7dc83cd2791392b3115c8f96fc6 (diff)
print number of texture units
Diffstat (limited to 'progs/demos/multiarb.c')
-rw-r--r--progs/demos/multiarb.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/progs/demos/multiarb.c b/progs/demos/multiarb.c
index 18d6c01a723..aa0beb9bc75 100644
--- a/progs/demos/multiarb.c
+++ b/progs/demos/multiarb.c
@@ -1,4 +1,4 @@
-/* $Id: multiarb.c,v 1.6 2000/05/23 23:21:00 brianp Exp $ */
+/* $Id: multiarb.c,v 1.7 2000/11/01 16:02:01 brianp Exp $ */
/*
* GL_ARB_multitexture demo
@@ -12,6 +12,9 @@
/*
* $Log: multiarb.c,v $
+ * Revision 1.7 2000/11/01 16:02:01 brianp
+ * print number of texture units
+ *
* Revision 1.6 2000/05/23 23:21:00 brianp
* set default window pos
*
@@ -246,6 +249,7 @@ static void SpecialKey( int key, int x, int y )
static void Init( int argc, char *argv[] )
{
GLuint texObj[2];
+ GLint units;
const char *exten = (const char *) glGetString(GL_EXTENSIONS);
if (!strstr(exten, "GL_ARB_multitexture")) {
@@ -253,6 +257,9 @@ static void Init( int argc, char *argv[] )
exit(1);
}
+ glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &units);
+ printf("%d texture units supported\n", units);
+
/* allocate two texture objects */
glGenTextures(2, texObj);