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

t_rasterpos.c File Reference

#include "main/glheader.h"
#include "main/colormac.h"
#include "main/context.h"
#include "main/feedback.h"
#include "main/light.h"
#include "main/macros.h"
#include "main/rastpos.h"
#include "main/simple_list.h"
#include "main/mtypes.h"
#include "math/m_matrix.h"
#include "tnl/tnl.h"

Functions

static GLuint viewclip_point_xy (const GLfloat v[])
 Clip a point against the view volume.
static GLuint viewclip_point_z (const GLfloat v[])
 Clip a point against the far/near Z clipping planes.
static GLuint userclip_point (GLcontext *ctx, const GLfloat v[])
 Clip a point against the user clipping planes.
static void shade_rastpos (GLcontext *ctx, const GLfloat vertex[4], const GLfloat normal[3], GLfloat Rcolor[4], GLfloat Rspec[4], GLfloat *Rindex)
 Compute lighting for the raster position.
static void compute_texgen (GLcontext *ctx, const GLfloat vObj[4], const GLfloat vEye[4], const GLfloat normal[3], GLuint unit, GLfloat texcoord[4])
 Do texgen needed for glRasterPos.
void _tnl_RasterPos (GLcontext *ctx, const GLfloat vObj[4])
 glRasterPos transformation.


Function Documentation

void _tnl_RasterPos ( GLcontext ctx,
const GLfloat  vObj[4] 
)

glRasterPos transformation.

Typically called via ctx->Driver.RasterPos(). XXX some of this code (such as viewport xform, clip testing and setting of ctx->Current.Raster* fields) could get lifted up into the main/rasterpos.c code.

Parameters:
vObj vertex position in object space

static void compute_texgen ( GLcontext ctx,
const GLfloat  vObj[4],
const GLfloat  vEye[4],
const GLfloat  normal[3],
GLuint  unit,
GLfloat  texcoord[4] 
) [static]

Do texgen needed for glRasterPos.

Parameters:
ctx rendering context
vObj object-space vertex coordinate
vEye eye-space vertex coordinate
normal vertex normal
unit texture unit number
texcoord incoming texcoord and resulting texcoord

static void shade_rastpos ( GLcontext ctx,
const GLfloat  vertex[4],
const GLfloat  normal[3],
GLfloat  Rcolor[4],
GLfloat  Rspec[4],
GLfloat *  Rindex 
) [static]

Compute lighting for the raster position.

Both RGB and CI modes computed.

Parameters:
ctx the context
vertex vertex location
normal normal vector
Rcolor returned color
Rspec returned specular color (if separate specular enabled)
Rindex returned color index

static GLuint userclip_point ( GLcontext ctx,
const GLfloat  v[] 
) [static]

Clip a point against the user clipping planes.

Parameters:
ctx GL context.
v vertex vector describing the point to clip.
Returns:
zero if the point was clipped, or one otherwise.

static GLuint viewclip_point_xy ( const GLfloat  v[]  )  [static]

Clip a point against the view volume.

Parameters:
v vertex vector describing the point to clip.
Returns:
zero if outside view volume, or one if inside.

static GLuint viewclip_point_z ( const GLfloat  v[]  )  [static]

Clip a point against the far/near Z clipping planes.

Parameters:
v vertex vector describing the point to clip.
Returns:
zero if outside view volume, or one if inside.


Generated on Sun Sep 27 06:48:09 2009 for Mesa Transform and Lighting (tnl) by  doxygen 1.5.4