#include "main/glheader.h"
#include "main/image.h"
#include "main/macros.h"
#include "s_context.h"
Defines | |
| #define | ABS(X) ((X) < 0 ? -(X) : (X)) |
| #define | RESAMPLE(NAME, PIXELTYPE, SIZE) |
| Generate a row resampler function for GL_NEAREST mode. | |
| #define | LERP(T, A, B) ( (A) + (T) * ((B) - (A)) ) |
Functions | |
| static void | blit_nearest (GLcontext *ctx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield buffer) |
| Resamplers for 1, 2, 4, 8 and 16-byte pixels. | |
| static INLINE GLfloat | lerp_2d (GLfloat a, GLfloat b, GLfloat v00, GLfloat v10, GLfloat v01, GLfloat v11) |
| static void | resample_linear_row_ub (GLint srcWidth, GLint dstWidth, const GLvoid *srcBuffer0, const GLvoid *srcBuffer1, GLvoid *dstBuffer, GLboolean flip, GLfloat rowWeight) |
| Bilinear interpolation of two source rows. | |
| static void | blit_linear (GLcontext *ctx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1) |
| Bilinear filtered blit (color only). | |
| static void | simple_blit (GLcontext *ctx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield buffer) |
| Simple case: Blit color, depth or stencil with no scaling or flipping. | |
| void | _swrast_BlitFramebuffer (GLcontext *ctx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) |
| Software fallback for glBlitFramebufferEXT(). | |
| #define ABS | ( | X | ) | ((X) < 0 ? -(X) : (X)) |
| #define LERP | ( | T, | |||
| A, | |||||
| B | ) | ( (A) + (T) * ((B) - (A)) ) |
| #define RESAMPLE | ( | NAME, | |||
| PIXELTYPE, | |||||
| SIZE | ) |
Generate a row resampler function for GL_NEAREST mode.
| void _swrast_BlitFramebuffer | ( | GLcontext * | ctx, | |
| GLint | srcX0, | |||
| GLint | srcY0, | |||
| GLint | srcX1, | |||
| GLint | srcY1, | |||
| GLint | dstX0, | |||
| GLint | dstY0, | |||
| GLint | dstX1, | |||
| GLint | dstY1, | |||
| GLbitfield | mask, | |||
| GLenum | filter | |||
| ) |
Software fallback for glBlitFramebufferEXT().
| static void blit_linear | ( | GLcontext * | ctx, | |
| GLint | srcX0, | |||
| GLint | srcY0, | |||
| GLint | srcX1, | |||
| GLint | srcY1, | |||
| GLint | dstX0, | |||
| GLint | dstY0, | |||
| GLint | dstX1, | |||
| GLint | dstY1 | |||
| ) | [static] |
Bilinear filtered blit (color only).
| static void blit_nearest | ( | GLcontext * | ctx, | |
| GLint | srcX0, | |||
| GLint | srcY0, | |||
| GLint | srcX1, | |||
| GLint | srcY1, | |||
| GLint | dstX0, | |||
| GLint | dstY0, | |||
| GLint | dstX1, | |||
| GLint | dstY1, | |||
| GLbitfield | buffer | |||
| ) | [static] |
Resamplers for 1, 2, 4, 8 and 16-byte pixels.
Blit color, depth or stencil with GL_NEAREST filtering.
| static INLINE GLfloat lerp_2d | ( | GLfloat | a, | |
| GLfloat | b, | |||
| GLfloat | v00, | |||
| GLfloat | v10, | |||
| GLfloat | v01, | |||
| GLfloat | v11 | |||
| ) | [static] |
| static void resample_linear_row_ub | ( | GLint | srcWidth, | |
| GLint | dstWidth, | |||
| const GLvoid * | srcBuffer0, | |||
| const GLvoid * | srcBuffer1, | |||
| GLvoid * | dstBuffer, | |||
| GLboolean | flip, | |||
| GLfloat | rowWeight | |||
| ) | [static] |
Bilinear interpolation of two source rows.
GLubyte pixels.
| static void simple_blit | ( | GLcontext * | ctx, | |
| GLint | srcX0, | |||
| GLint | srcY0, | |||
| GLint | srcX1, | |||
| GLint | srcY1, | |||
| GLint | dstX0, | |||
| GLint | dstY0, | |||
| GLint | dstX1, | |||
| GLint | dstY1, | |||
| GLbitfield | buffer | |||
| ) | [static] |
Simple case: Blit color, depth or stencil with no scaling or flipping.
XXX we could easily support vertical flipping here.
1.5.4