mesa: remove unused _math_trans_4chan()
[mesa.git] / src / mesa / math / m_translate.h
1 /*
2 * Mesa 3-D graphics library
3 *
4 * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
23 */
24
25
26 #ifndef _M_TRANSLATE_H_
27 #define _M_TRANSLATE_H_
28
29 #include "main/compiler.h"
30 #include "main/glheader.h"
31
32 /**
33 * Array translation.
34 * For example, convert array of GLushort[3] to GLfloat[4].
35 * The function name specifies the destination format/size.
36 * \param to the destination address
37 * \param ptr the source address
38 * \param stride the source stride (in bytes) between elements
39 * \param type the source datatype (GL_SHORT, GL_UNSIGNED_INT, etc)
40 * \param size number of values per element in source array (1,2,3 or 4)
41 * \param start first element in source array to convert
42 * \param n number of elements to convert
43 *
44 * Note: "element" means a tuple like GLfloat[3] or GLubyte[4].
45 */
46
47
48 extern void _math_trans_1f(GLfloat *to,
49 const void *ptr,
50 GLuint stride,
51 GLenum type,
52 GLuint start,
53 GLuint n );
54
55 extern void _math_trans_1ui(GLuint *to,
56 const void *ptr,
57 GLuint stride,
58 GLenum type,
59 GLuint start,
60 GLuint n );
61
62 extern void _math_trans_1ub(GLubyte *to,
63 const void *ptr,
64 GLuint stride,
65 GLenum type,
66 GLuint start,
67 GLuint n );
68
69 extern void _math_trans_4ub(GLubyte (*to)[4],
70 const void *ptr,
71 GLuint stride,
72 GLenum type,
73 GLuint size,
74 GLuint start,
75 GLuint n );
76
77 extern void _math_trans_4us(GLushort (*to)[4],
78 const void *ptr,
79 GLuint stride,
80 GLenum type,
81 GLuint size,
82 GLuint start,
83 GLuint n );
84
85 /** Convert to floats w/out normalization (i.e. just cast) */
86 extern void _math_trans_4f(GLfloat (*to)[4],
87 const void *ptr,
88 GLuint stride,
89 GLenum type,
90 GLuint size,
91 GLuint start,
92 GLuint n );
93
94 /** Convert to normalized floats in [0,1] or [-1, 1] */
95 extern void _math_trans_4fn(GLfloat (*to)[4],
96 const void *ptr,
97 GLuint stride,
98 GLenum type,
99 GLuint size,
100 GLuint start,
101 GLuint n );
102
103 extern void _math_trans_3fn(GLfloat (*to)[3],
104 const void *ptr,
105 GLuint stride,
106 GLenum type,
107 GLuint start,
108 GLuint n );
109
110 extern void _math_init_translate( void );
111
112
113 #endif