summaryrefslogtreecommitdiffstats
path: root/src/mesa/math/m_translate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/math/m_translate.c')
-rw-r--r--src/mesa/math/m_translate.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mesa/math/m_translate.c b/src/mesa/math/m_translate.c
index 0eb2ee8281f..967f6a54cf5 100644
--- a/src/mesa/math/m_translate.c
+++ b/src/mesa/math/m_translate.c
@@ -1,4 +1,4 @@
-/* $Id: m_translate.c,v 1.4 2001/01/24 00:04:59 brianp Exp $ */
+/* $Id: m_translate.c,v 1.5 2001/02/20 18:28:52 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -30,6 +30,7 @@
#include "glheader.h"
+#include "mtypes.h" /* GLchan hack */
#include "colormac.h"
#include "mem.h"
#include "mmath.h"
@@ -603,6 +604,23 @@ void _math_trans_4ub(GLubyte (*to)[4],
_math_trans_4ub_tab[size][TYPE_IDX(type)]( to, ptr, stride, start, n );
}
+void _math_trans_4chan( GLchan (*to)[4],
+ CONST void *ptr,
+ GLuint stride,
+ GLenum type,
+ GLuint size,
+ GLuint start,
+ GLuint n )
+{
+#if CHAN_TYPE == GL_UNSIGNED_BYTE
+ _math_trans_4ub( to, ptr, stride, type, size, start, n );
+#elif CHAN_TYPE == GL_UNSIGNED_SHORT
+ _math_trans_4us( to, ptr, stride, type, size, start, n );
+#elif CHAN_TYPE == GL_FLOAT
+ _math_trans_4f( to, ptr, stride, type, size, start, n );
+#endif
+}
+
void _math_trans_4us(GLushort (*to)[4],
CONST void *ptr,
GLuint stride,