core | glapi | vbo | math | shader | swrast | swrast_setup | tnl | tnl_dd

m_translate.h File Reference

#include "main/config.h"
#include "main/mtypes.h"

Functions

void _math_trans_1f (GLfloat *to, CONST void *ptr, GLuint stride, GLenum type, GLuint start, GLuint n)
 Array translation.
void _math_trans_1ui (GLuint *to, CONST void *ptr, GLuint stride, GLenum type, GLuint start, GLuint n)
 Translate vector of values to GLuint [1].
void _math_trans_1ub (GLubyte *to, CONST void *ptr, GLuint stride, GLenum type, GLuint start, GLuint n)
 Translate vector of values to GLubyte [1].
void _math_trans_4ub (GLubyte(*to)[4], CONST void *ptr, GLuint stride, GLenum type, GLuint size, GLuint start, GLuint n)
 Translate vector of values to GLubyte [4].
void _math_trans_4chan (GLchan(*to)[4], CONST void *ptr, GLuint stride, GLenum type, GLuint size, GLuint start, GLuint n)
 Translate vector of values to GLchan [4].
void _math_trans_4us (GLushort(*to)[4], CONST void *ptr, GLuint stride, GLenum type, GLuint size, GLuint start, GLuint n)
 Translate vector of values to GLushort [4].
void _math_trans_4f (GLfloat(*to)[4], CONST void *ptr, GLuint stride, GLenum type, GLuint size, GLuint start, GLuint n)
 Convert to floats w/out normalization (i.e.
void _math_trans_4fn (GLfloat(*to)[4], CONST void *ptr, GLuint stride, GLenum type, GLuint size, GLuint start, GLuint n)
 Convert to normalized floats in [0,1] or [-1, 1].
void _math_trans_3fn (GLfloat(*to)[3], CONST void *ptr, GLuint stride, GLenum type, GLuint start, GLuint n)
 Translate vector of values to GLfloat[3], normalized to [-1, 1].
void _math_init_translate (void)


Function Documentation

void _math_init_translate ( void   ) 

void _math_trans_1f ( GLfloat *  to,
CONST void *  ptr,
GLuint  stride,
GLenum  type,
GLuint  start,
GLuint  n 
)

Array translation.

For example, convert array of GLushort[3] to GLfloat[4]. The function name specifies the destination format/size.

Parameters:
to the destination address
ptr the source address
stride the source stride (in bytes) between elements
type the source datatype (GL_SHORT, GL_UNSIGNED_INT, etc)
size number of values per element in source array (1,2,3 or 4)
start first element in source array to convert
n number of elements to convert
Note: "element" means a tuple like GLfloat[3] or GLubyte[4].

void _math_trans_1ub ( GLubyte *  to,
CONST void *  ptr,
GLuint  stride,
GLenum  type,
GLuint  start,
GLuint  n 
)

Translate vector of values to GLubyte [1].

void _math_trans_1ui ( GLuint *  to,
CONST void *  ptr,
GLuint  stride,
GLenum  type,
GLuint  start,
GLuint  n 
)

Translate vector of values to GLuint [1].

void _math_trans_3fn ( GLfloat *  to[3],
CONST void *  ptr,
GLuint  stride,
GLenum  type,
GLuint  start,
GLuint  n 
)

Translate vector of values to GLfloat[3], normalized to [-1, 1].

void _math_trans_4chan ( GLchan *  to[4],
CONST void *  ptr,
GLuint  stride,
GLenum  type,
GLuint  size,
GLuint  start,
GLuint  n 
)

Translate vector of values to GLchan [4].

void _math_trans_4f ( GLfloat *  to[4],
CONST void *  ptr,
GLuint  stride,
GLenum  type,
GLuint  size,
GLuint  start,
GLuint  n 
)

Convert to floats w/out normalization (i.e.

just cast)

void _math_trans_4fn ( GLfloat *  to[4],
CONST void *  ptr,
GLuint  stride,
GLenum  type,
GLuint  size,
GLuint  start,
GLuint  n 
)

Convert to normalized floats in [0,1] or [-1, 1].

void _math_trans_4ub ( GLubyte *  to[4],
CONST void *  ptr,
GLuint  stride,
GLenum  type,
GLuint  size,
GLuint  start,
GLuint  n 
)

Translate vector of values to GLubyte [4].

void _math_trans_4us ( GLushort *  to[4],
CONST void *  ptr,
GLuint  stride,
GLenum  type,
GLuint  size,
GLuint  start,
GLuint  n 
)

Translate vector of values to GLushort [4].


Generated on Sun Sep 27 06:47:50 2009 for Mesa math module by  doxygen 1.5.4