The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Macros | Functions
SDL_gpu_GL_matrix.c File Reference
#include "SDL_gpu.h"
#include "SDL_gpu_GL_matrix.h"
#include <math.h>
#include <string.h>
Include dependency graph for SDL_gpu_GL_matrix.c:

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)
 

Macro Definition Documentation

#define INDEX (   row,
  col 
)    ((col)*4 + (row))

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.

Function Documentation

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  )
const char* GPU_GetMatrixString ( float *  A)

Definition at line 104 of file SDL_gpu_GL_matrix.c.

float* GPU_GetModelView ( void  )
void GPU_GetModelViewProjection ( float *  result)
float* GPU_GetProjection ( void  )
void GPU_LoadIdentity ( void  )

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().

void GPU_MatrixMode ( int  matrix_mode)
void GPU_Multiply4x4 ( float *  result,
float *  A,
float *  B 
)

Definition at line 75 of file SDL_gpu_GL_matrix.c.

References c, i, and INDEX.

Referenced by GPU_GetModelViewProjection(), and GPU_MultiplyAndAssign().

void GPU_MultiplyAndAssign ( float *  result,
float *  A 
)
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().

void GPU_PopMatrix ( void  )
void GPU_PushMatrix ( void  )
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().