summaryrefslogtreecommitdiff
path: root/src/glut/dos/color.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-02-04 02:43:27 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-02-04 02:43:27 +0000
commit398c6b7980ac52ba15af78f45e71f49f33ded1aa (patch)
tree3e93472cfbe4de6c5478bf5c8bdc39f3f685e7d7 /src/glut/dos/color.c
parent657a9d64d74d987af0d6c9c847af98cc65d9d76e (diff)
DOS updates (Daniel Borca)
Diffstat (limited to 'src/glut/dos/color.c')
-rw-r--r--src/glut/dos/color.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/glut/dos/color.c b/src/glut/dos/color.c
index f1f529521d..2e8ed3f95b 100644
--- a/src/glut/dos/color.c
+++ b/src/glut/dos/color.c
@@ -27,9 +27,8 @@
*/
-#include "GL/glut.h"
+#include "glutint.h"
#include "GL/dmesa.h"
-#include "internal.h"
@@ -40,7 +39,9 @@
void APIENTRY glutSetColor (int ndx, GLfloat red, GLfloat green, GLfloat blue)
{
if (g_display_mode & GLUT_INDEX) {
- DMesaSetCI(ndx, CLAMP(red), CLAMP(green), CLAMP(blue));
+ if ((ndx >= 0) && (ndx < (256 - RESERVED_COLORS))) {
+ DMesaSetCI(ndx, CLAMP(red), CLAMP(green), CLAMP(blue));
+ }
}
}