diff options
author | Keith Whitwell <[email protected]> | 2001-02-20 18:28:52 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2001-02-20 18:28:52 +0000 |
commit | 4eebc90a174722422daea6352d4e980bc81b4bb2 (patch) | |
tree | fd3f4bedaaf568c17d99cd9e028622ffd505a329 /src/mesa/math/m_translate.c | |
parent | 8bbc71f2eb6a3d7acce6bc1a66a4caea54d3fc8d (diff) |
Added GLvector4chan type, removed lots of CHAN_TYPE ifdefs.
Diffstat (limited to 'src/mesa/math/m_translate.c')
-rw-r--r-- | src/mesa/math/m_translate.c | 20 |
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, |