Go to the source code of this file.
Macros | |
#define | M_PI 3.1415926f |
#define | static_inline static inline |
#define | INDEX(row, col) ((col)*4 + (row)) |
Functions | |
void | GPU_MatrixCopy (float *result, const float *A) |
void | GPU_MatrixIdentity (float *result) |
void | GPU_Multiply4x4 (float *result, float *A, float *B) |
void | GPU_MultiplyAndAssign (float *result, float *A) |
const char * | GPU_GetMatrixString (float *A) |
void | GPU_MatrixMode (int matrix_mode) |
float * | GPU_GetModelView (void) |
float * | GPU_GetProjection (void) |
float * | GPU_GetCurrentMatrix (void) |
void | GPU_PushMatrix () |
void | GPU_PopMatrix () |
void | GPU_LoadIdentity (void) |
void | GPU_Ortho (float left, float right, float bottom, float top, float near, float far) |
void | GPU_Frustum (float right, float left, float bottom, float top, float near, float far) |
void | GPU_Translate (float x, float y, float z) |
void | GPU_Scale (float sx, float sy, float sz) |
void | GPU_Rotate (float degrees, float x, float y, float z) |
void | GPU_MultMatrix (float *A) |
void | GPU_GetModelViewProjection (float *result) |
Definition at line 61 of file SDL_gpu_GL_matrix.c.
Referenced by GPU_Multiply4x4().
#define M_PI 3.1415926f |
Definition at line 11 of file SDL_gpu_GL_matrix.c.
Referenced by GPU_Rotate().
#define static_inline static inline |
Definition at line 24 of file SDL_gpu_GL_matrix.c.
void GPU_Frustum | ( | float | right, |
float | left, | ||
float | bottom, | ||
float | top, | ||
float | near, | ||
float | far | ||
) |
Definition at line 242 of file SDL_gpu_GL_matrix.c.
References GPU_GetCurrentMatrix(), and GPU_MultiplyAndAssign().
float* GPU_GetCurrentMatrix | ( | void | ) |
Definition at line 159 of file SDL_gpu_GL_matrix.c.
References GPU_Target::context, GPU_GetContextTarget(), GPU_MODELVIEW, GPU_MatrixStack::matrix, GPU_Context::matrix_mode, GPU_Context::modelview_matrix, GPU_Context::projection_matrix, and GPU_MatrixStack::size.
Referenced by GPU_Frustum(), GPU_LoadIdentity(), GPU_MultMatrix(), GPU_Ortho(), GPU_Rotate(), GPU_Scale(), and GPU_Translate().
const char* GPU_GetMatrixString | ( | float * | A | ) |
Definition at line 104 of file SDL_gpu_GL_matrix.c.
float* GPU_GetModelView | ( | void | ) |
Definition at line 133 of file SDL_gpu_GL_matrix.c.
References GPU_Target::context, GPU_GetContextTarget(), GPU_MatrixStack::matrix, GPU_Context::modelview_matrix, and GPU_MatrixStack::size.
Referenced by GPU_GetModelViewProjection().
void GPU_GetModelViewProjection | ( | float * | result | ) |
Definition at line 353 of file SDL_gpu_GL_matrix.c.
References GPU_GetModelView(), GPU_GetProjection(), and GPU_Multiply4x4().
Referenced by BlitBatch(), DoPartialFlush(), DoUntexturedFlush(), and TriangleBatch().
float* GPU_GetProjection | ( | void | ) |
Definition at line 146 of file SDL_gpu_GL_matrix.c.
References GPU_Target::context, GPU_GetContextTarget(), GPU_MatrixStack::matrix, GPU_Context::projection_matrix, and GPU_MatrixStack::size.
Referenced by GPU_GetModelViewProjection().
Definition at line 211 of file SDL_gpu_GL_matrix.c.
References GPU_GetCurrentMatrix(), and GPU_MatrixIdentity().
Referenced by applyTargetCamera().
void GPU_MatrixCopy | ( | float * | result, |
const float * | A | ||
) |
Definition at line 63 of file SDL_gpu_GL_matrix.c.
Referenced by GPU_MultiplyAndAssign(), and GPU_PushMatrix().
void GPU_MatrixIdentity | ( | float * | result | ) |
Definition at line 68 of file SDL_gpu_GL_matrix.c.
Referenced by CreateTargetFromWindow(), and GPU_LoadIdentity().
Definition at line 124 of file SDL_gpu_GL_matrix.c.
References GPU_Target::context, GPU_GetContextTarget(), and GPU_Context::matrix_mode.
Referenced by applyTargetCamera().
void GPU_Multiply4x4 | ( | float * | result, |
float * | A, | ||
float * | B | ||
) |
Definition at line 75 of file SDL_gpu_GL_matrix.c.
Referenced by GPU_GetModelViewProjection(), and GPU_MultiplyAndAssign().
void GPU_MultiplyAndAssign | ( | float * | result, |
float * | A | ||
) |
Definition at line 92 of file SDL_gpu_GL_matrix.c.
References GPU_MatrixCopy(), and GPU_Multiply4x4().
Referenced by GPU_Frustum(), GPU_MultMatrix(), GPU_Ortho(), GPU_Rotate(), GPU_Scale(), and GPU_Translate().
void GPU_MultMatrix | ( | float * | A | ) |
Definition at line 345 of file SDL_gpu_GL_matrix.c.
References GPU_GetCurrentMatrix(), and GPU_MultiplyAndAssign().
Referenced by BlitTransformMatrix().
void GPU_Ortho | ( | float | left, |
float | right, | ||
float | bottom, | ||
float | top, | ||
float | near, | ||
float | far | ||
) |
Definition at line 219 of file SDL_gpu_GL_matrix.c.
References GPU_GetCurrentMatrix(), and GPU_MultiplyAndAssign().
Referenced by applyTargetCamera().
Definition at line 194 of file SDL_gpu_GL_matrix.c.
References GPU_Target::context, GPU_ERROR_USER_ERROR, GPU_GetContextTarget(), GPU_MODELVIEW, GPU_PushErrorCode(), GPU_Context::matrix_mode, GPU_Context::modelview_matrix, GPU_Context::projection_matrix, and GPU_MatrixStack::size.
Referenced by BlitTransformMatrix().
Definition at line 176 of file SDL_gpu_GL_matrix.c.
References GPU_Target::context, GPU_ERROR_USER_ERROR, GPU_GetContextTarget(), GPU_MATRIX_STACK_MAX, GPU_MatrixCopy(), GPU_MODELVIEW, GPU_PushErrorCode(), GPU_MatrixStack::matrix, GPU_Context::matrix_mode, GPU_Context::modelview_matrix, GPU_Context::projection_matrix, and GPU_MatrixStack::size.
Referenced by BlitTransformMatrix().
void GPU_Rotate | ( | float | degrees, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Definition at line 304 of file SDL_gpu_GL_matrix.c.
References c, GPU_GetCurrentMatrix(), GPU_MultiplyAndAssign(), and M_PI.
Referenced by applyTargetCamera().
void GPU_Scale | ( | float | sx, |
float | sy, | ||
float | sz | ||
) |
Definition at line 288 of file SDL_gpu_GL_matrix.c.
References GPU_GetCurrentMatrix(), and GPU_MultiplyAndAssign().
Referenced by applyTargetCamera().
void GPU_Translate | ( | float | x, |
float | y, | ||
float | z | ||
) |
Definition at line 265 of file SDL_gpu_GL_matrix.c.
References GPU_GetCurrentMatrix(), and GPU_MultiplyAndAssign().
Referenced by applyTargetCamera(), and BlitTransformMatrix().