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

s_zoom.c File Reference

#include "main/glheader.h"
#include "main/macros.h"
#include "main/imports.h"
#include "main/colormac.h"
#include "s_context.h"
#include "s_span.h"
#include "s_stencil.h"
#include "s_zoom.h"

Functions

static GLboolean compute_zoomed_bounds (GLcontext *ctx, GLint imageX, GLint imageY, GLint spanX, GLint spanY, GLint width, GLint *x0, GLint *x1, GLint *y0, GLint *y1)
 Compute the bounds of the region resulting from zooming a pixel span.
static INLINE GLint unzoom_x (GLfloat zoomX, GLint imageX, GLint zx)
 Convert a zoomed x image coordinate back to an unzoomed x coord.
static void zoom_span (GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span, const GLvoid *src, GLenum format)
 Helper function called from _swrast_write_zoomed_rgba/rgb/ index/depth_span().
void _swrast_write_zoomed_rgba_span (GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span, const GLvoid *rgba)
void _swrast_write_zoomed_rgb_span (GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span, const GLvoid *rgb)
void _swrast_write_zoomed_index_span (GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span)
void _swrast_write_zoomed_depth_span (GLcontext *ctx, GLint imgX, GLint imgY, const SWspan *span)
void _swrast_write_zoomed_stencil_span (GLcontext *ctx, GLint imgX, GLint imgY, GLint width, GLint spanX, GLint spanY, const GLstencil stencil[])
 Zoom/write stencil values.
void _swrast_write_zoomed_z_span (GLcontext *ctx, GLint imgX, GLint imgY, GLint width, GLint spanX, GLint spanY, const GLvoid *z)
 Zoom/write z values (16 or 32-bit).


Function Documentation

void _swrast_write_zoomed_depth_span ( GLcontext ctx,
GLint  imgX,
GLint  imgY,
const SWspan span 
)

void _swrast_write_zoomed_index_span ( GLcontext ctx,
GLint  imgX,
GLint  imgY,
const SWspan span 
)

void _swrast_write_zoomed_rgb_span ( GLcontext ctx,
GLint  imgX,
GLint  imgY,
const SWspan span,
const GLvoid *  rgb 
)

void _swrast_write_zoomed_rgba_span ( GLcontext ctx,
GLint  imgX,
GLint  imgY,
const SWspan span,
const GLvoid *  rgba 
)

void _swrast_write_zoomed_stencil_span ( GLcontext ctx,
GLint  imgX,
GLint  imgY,
GLint  width,
GLint  spanX,
GLint  spanY,
const GLstencil  stencil[] 
)

Zoom/write stencil values.

No per-fragment operations are applied.

void _swrast_write_zoomed_z_span ( GLcontext ctx,
GLint  imgX,
GLint  imgY,
GLint  width,
GLint  spanX,
GLint  spanY,
const GLvoid *  z 
)

Zoom/write z values (16 or 32-bit).

No per-fragment operations are applied.

static GLboolean compute_zoomed_bounds ( GLcontext ctx,
GLint  imageX,
GLint  imageY,
GLint  spanX,
GLint  spanY,
GLint  width,
GLint *  x0,
GLint *  x1,
GLint *  y0,
GLint *  y1 
) [static]

Compute the bounds of the region resulting from zooming a pixel span.

The resulting region will be entirely inside the window/scissor bounds so no additional clipping is needed.

Parameters:
imageX,imageY position of the mage being drawn (gl WindowPos)
spanX,spanY position of span being drawing
width number of pixels in span
x0,x1 returned X bounds of zoomed region [x0, x1)
y0,y1 returned Y bounds of zoomed region [y0, y1)
Returns:
GL_TRUE if any zoomed pixels visible, GL_FALSE if totally clipped

static INLINE GLint unzoom_x ( GLfloat  zoomX,
GLint  imageX,
GLint  zx 
) [static]

Convert a zoomed x image coordinate back to an unzoomed x coord.

'zx' is screen position of a pixel in the zoomed image, who's left edge is at 'imageX'. return corresponding x coord in the original, unzoomed image. This can use this for unzooming X or Y values.

static void zoom_span ( GLcontext ctx,
GLint  imgX,
GLint  imgY,
const SWspan span,
const GLvoid *  src,
GLenum  format 
) [static]

Helper function called from _swrast_write_zoomed_rgba/rgb/ index/depth_span().


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