#include "main/glheader.h"
#include "main/context.h"
#include "main/imports.h"
#include "main/state.h"
#include "main/mtypes.h"
#include "main/macros.h"
#include "main/enums.h"
#include "t_context.h"
#include "t_pipeline.h"
#include "t_vp_build.h"
#include "t_vertex.h"
#include "tnl.h"
Defines | |
#define | CONVERT(TYPE, MACRO) |
#define | CLIPVERTS ((6 + MAX_CLIP_PLANES) * 2) |
Functions | |
static GLubyte * | get_space (GLcontext *ctx, GLuint bytes) |
static void | free_space (GLcontext *ctx) |
static void | convert_bgra_to_float (const struct gl_client_array *input, const GLubyte *ptr, GLfloat *fptr, GLuint count) |
Convert array of BGRA/GLubyte[4] values to RGBA/float[4]. | |
static void | _tnl_import_array (GLcontext *ctx, GLuint attrib, GLuint count, const struct gl_client_array *input, const GLubyte *ptr) |
static GLboolean * | _tnl_import_edgeflag (GLcontext *ctx, const GLvector4f *input, GLuint count) |
static void | bind_inputs (GLcontext *ctx, const struct gl_client_array *inputs[], GLint count, struct gl_buffer_object **bo, GLuint *nr_bo) |
static void | bind_indices (GLcontext *ctx, const struct _mesa_index_buffer *ib, struct gl_buffer_object **bo, GLuint *nr_bo) |
static void | bind_prims (GLcontext *ctx, const struct _mesa_prim *prim, GLuint nr_prims) |
static void | unmap_vbos (GLcontext *ctx, struct gl_buffer_object **bo, GLuint nr_bo) |
void | _tnl_vbo_draw_prims (GLcontext *ctx, const struct gl_client_array *arrays[], const struct _mesa_prim *prim, GLuint nr_prims, const struct _mesa_index_buffer *ib, GLboolean index_bounds_valid, GLuint min_index, GLuint max_index) |
void | _tnl_draw_prims (GLcontext *ctx, const struct gl_client_array *arrays[], const struct _mesa_prim *prim, GLuint nr_prims, const struct _mesa_index_buffer *ib, GLuint min_index, GLuint max_index) |
#define CLIPVERTS ((6 + MAX_CLIP_PLANES) * 2) |
#define CONVERT | ( | TYPE, | |||
MACRO | ) |
Value:
do { \ GLuint i, j; \ if (input->Normalized) { \ for (i = 0; i < count; i++) { \ const TYPE *in = (TYPE *)ptr; \ for (j = 0; j < sz; j++) { \ *fptr++ = MACRO(*in); \ in++; \ } \ ptr += input->StrideB; \ } \ } else { \ for (i = 0; i < count; i++) { \ const TYPE *in = (TYPE *)ptr; \ for (j = 0; j < sz; j++) { \ *fptr++ = (GLfloat)(*in); \ in++; \ } \ ptr += input->StrideB; \ } \ } \ } while (0)
void _tnl_draw_prims | ( | GLcontext * | ctx, | |
const struct gl_client_array * | arrays[], | |||
const struct _mesa_prim * | prim, | |||
GLuint | nr_prims, | |||
const struct _mesa_index_buffer * | ib, | |||
GLuint | min_index, | |||
GLuint | max_index | |||
) |
static void _tnl_import_array | ( | GLcontext * | ctx, | |
GLuint | attrib, | |||
GLuint | count, | |||
const struct gl_client_array * | input, | |||
const GLubyte * | ptr | |||
) | [static] |
static GLboolean* _tnl_import_edgeflag | ( | GLcontext * | ctx, | |
const GLvector4f * | input, | |||
GLuint | count | |||
) | [static] |
void _tnl_vbo_draw_prims | ( | GLcontext * | ctx, | |
const struct gl_client_array * | arrays[], | |||
const struct _mesa_prim * | prim, | |||
GLuint | nr_prims, | |||
const struct _mesa_index_buffer * | ib, | |||
GLboolean | index_bounds_valid, | |||
GLuint | min_index, | |||
GLuint | max_index | |||
) |
static void bind_indices | ( | GLcontext * | ctx, | |
const struct _mesa_index_buffer * | ib, | |||
struct gl_buffer_object ** | bo, | |||
GLuint * | nr_bo | |||
) | [static] |
static void bind_inputs | ( | GLcontext * | ctx, | |
const struct gl_client_array * | inputs[], | |||
GLint | count, | |||
struct gl_buffer_object ** | bo, | |||
GLuint * | nr_bo | |||
) | [static] |
static void bind_prims | ( | GLcontext * | ctx, | |
const struct _mesa_prim * | prim, | |||
GLuint | nr_prims | |||
) | [static] |
static void convert_bgra_to_float | ( | const struct gl_client_array * | input, | |
const GLubyte * | ptr, | |||
GLfloat * | fptr, | |||
GLuint | count | |||
) | [static] |
Convert array of BGRA/GLubyte[4] values to RGBA/float[4].
ptr | input/ubyte array | |
fptr | output/float array |
static void free_space | ( | GLcontext * | ctx | ) | [static] |
static GLubyte* get_space | ( | GLcontext * | ctx, | |
GLuint | bytes | |||
) | [static] |
static void unmap_vbos | ( | GLcontext * | ctx, | |
struct gl_buffer_object ** | bo, | |||
GLuint | nr_bo | |||
) | [static] |