aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-03-01 01:50:20 +0000
committerBrian Paul <[email protected]>2003-03-01 01:50:20 +0000
commit27558a160a9fe91745728d7626995cd88f8fe339 (patch)
tree0b8cbbd49d418f5ef9f10d3d721c3d4e9e925c3d /src/mesa/main/context.c
parent4e50ab5f70582f4e362c4572b22a4c3f87c71a14 (diff)
Killed mmath.[ch]. Moved low-level functions/assembly code into imports.[ch]
Moved type conversion and interpolation macros into macros.h Updated all the files that used to include mmath.h
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 7430d94410f..b9bbe651933 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1,4 +1,4 @@
-/* $Id: context.c,v 1.193 2003/01/26 14:37:15 brianp Exp $ */
+/* $Id: context.c,v 1.194 2003/03/01 01:50:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -41,7 +41,6 @@
#include "hash.h"
#include "light.h"
#include "macros.h"
-#include "mmath.h"
#include "simple_list.h"
#include "state.h"
#include "teximage.h"
@@ -81,6 +80,9 @@ int MESA_DEBUG_FLAGS = 0;
#endif
+/* ubyte -> float conversion */
+GLfloat _mesa_ubyte_to_float_color_tab[256];
+
static void
free_shared_state( GLcontext *ctx, struct gl_shared_state *ss );
@@ -556,6 +558,8 @@ one_time_init( GLcontext *ctx )
static GLboolean alreadyCalled = GL_FALSE;
_glthread_LOCK_MUTEX(OneTimeLock);
if (!alreadyCalled) {
+ GLuint i;
+
/* do some implementation tests */
assert( sizeof(GLbyte) == 1 );
assert( sizeof(GLshort) >= 2 );
@@ -567,7 +571,10 @@ one_time_init( GLcontext *ctx )
_mesa_init_lists();
_math_init();
- _mesa_init_math();
+
+ for (i = 0; i < 256; i++) {
+ _mesa_ubyte_to_float_color_tab[i] = (float) i / 255.0F;
+ }
#ifdef USE_SPARC_ASM
_mesa_init_sparc_glapi_relocs();