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

s_texcombine.c File Reference

#include "main/glheader.h"
#include "main/context.h"
#include "main/colormac.h"
#include "main/image.h"
#include "main/imports.h"
#include "main/pixel.h"
#include "shader/prog_instruction.h"
#include "s_context.h"
#include "s_texcombine.h"

Typedefs

typedef float(* float4_array )[4]
 Pointer to array of float[4] This type makes the code below more concise and avoids a lot of casting.

Functions

static INLINE float4_array get_texel_array (SWcontext *swrast, GLuint unit)
 Return array of texels for given unit.
static void texture_combine (GLcontext *ctx, GLuint unit, GLuint n, const float4_array primary_rgba, const GLfloat *texelBuffer, GLchan(*rgbaChan)[4])
 Do texture application for: GL_EXT_texture_env_combine GL_ARB_texture_env_combine GL_EXT_texture_env_dot3 GL_ARB_texture_env_dot3 GL_ATI_texture_env_combine3 GL_NV_texture_env_combine4 conventional GL texture env modes.
static void swizzle_texels (GLuint swizzle, GLuint count, float4_array texels)
 Apply X/Y/Z/W/0/1 swizzle to an array of colors/texels.
void _swrast_texture_span (GLcontext *ctx, SWspan *span)
 Apply texture mapping to a span of fragments.


Typedef Documentation

typedef float(* float4_array)[4]

Pointer to array of float[4] This type makes the code below more concise and avoids a lot of casting.


Function Documentation

void _swrast_texture_span ( GLcontext ctx,
SWspan span 
)

Apply texture mapping to a span of fragments.

static INLINE float4_array get_texel_array ( SWcontext swrast,
GLuint  unit 
) [static]

Return array of texels for given unit.

static void swizzle_texels ( GLuint  swizzle,
GLuint  count,
float4_array  texels 
) [static]

Apply X/Y/Z/W/0/1 swizzle to an array of colors/texels.

See GL_EXT_texture_swizzle.

static void texture_combine ( GLcontext ctx,
GLuint  unit,
GLuint  n,
const float4_array  primary_rgba,
const GLfloat *  texelBuffer,
GLchan *  rgbaChan[4] 
) [static]

Do texture application for: GL_EXT_texture_env_combine GL_ARB_texture_env_combine GL_EXT_texture_env_dot3 GL_ARB_texture_env_dot3 GL_ATI_texture_env_combine3 GL_NV_texture_env_combine4 conventional GL texture env modes.

Parameters:
ctx rendering context
unit the texture combiner unit
n number of fragments to process (span width)
primary_rgba incoming fragment color array
texelBuffer pointer to texel colors for all texture units
rgba incoming/result fragment colors


Generated on Sun Sep 27 06:48:05 2009 for Mesa Software Rasterization (swrast) by  doxygen 1.5.4