diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2002-12-18 15:06:36 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2002-12-18 15:06:36 +0000 |
commit | 03516d9efa76720be2b0b8677573a5f93845c2da (patch) | |
tree | e6cda83d0b5f863aaa15ab5bca8c7637fc71d2b4 /src/glut/dos/color.c | |
parent | c0fc0d4e5f5c246fc2459348a3d114b232d0c545 (diff) |
DOS updates from Daniel Borca.
Diffstat (limited to 'src/glut/dos/color.c')
-rw-r--r-- | src/glut/dos/color.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/glut/dos/color.c b/src/glut/dos/color.c index 9a7754514c..f1f529521d 100644 --- a/src/glut/dos/color.c +++ b/src/glut/dos/color.c @@ -19,7 +19,7 @@ */
/*
- * DOS/DJGPP glut driver v1.0 for Mesa 4.0
+ * DOS/DJGPP glut driver v1.3 for Mesa 5.0
*
* Copyright (C) 2002 - Borca Daniel
* Email : dborca@yahoo.com
@@ -28,19 +28,31 @@ #include "GL/glut.h"
+#include "GL/dmesa.h"
+#include "internal.h"
+
+
+
+#define CLAMP(i) ((i) > 1.0 ? 1.0 : ((i) < 0.0 ? 0.0 : (i)))
+
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));
+ }
}
+
GLfloat APIENTRY glutGetColor (int ndx, int component)
{
return 0.0;
}
+
void APIENTRY glutCopyColormap (int win)
{
}
|