Blender  V3.3
GPU_matrix.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2012 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #include "BLI_sys_types.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 struct GPUShader;
17 
21 void GPU_matrix_reset(void);
22 
23 /* ModelView Matrix (2D or 3D) */
24 
25 void GPU_matrix_push(void); /* TODO: PushCopy vs PushIdentity? */
26 void GPU_matrix_pop(void);
27 
28 void GPU_matrix_identity_set(void);
29 
30 void GPU_matrix_scale_1f(float factor);
31 
32 /* 3D ModelView Matrix */
33 
34 void GPU_matrix_set(const float m[4][4]);
35 void GPU_matrix_mul(const float m[4][4]);
36 
37 void GPU_matrix_translate_3f(float x, float y, float z);
38 void GPU_matrix_translate_3fv(const float vec[3]);
39 void GPU_matrix_scale_3f(float x, float y, float z);
40 void GPU_matrix_scale_3fv(const float vec[3]);
41 
45 void GPU_matrix_rotate_3f(float deg, float x, float y, float z);
49 void GPU_matrix_rotate_3fv(float deg, const float axis[3]);
50 
51 void GPU_matrix_rotate_axis(float deg, char axis); /* TODO: enum for axis? */
52 
53 void GPU_matrix_look_at(float eyeX,
54  float eyeY,
55  float eyeZ,
56  float centerX,
57  float centerY,
58  float centerZ,
59  float upX,
60  float upY,
61  float upZ);
62 /* TODO: variant that takes eye[3], center[3], up[3] */
63 
64 /* 2D ModelView Matrix */
65 
66 void GPU_matrix_translate_2f(float x, float y);
67 void GPU_matrix_translate_2fv(const float vec[2]);
68 void GPU_matrix_scale_2f(float x, float y);
69 void GPU_matrix_scale_2fv(const float vec[2]);
70 void GPU_matrix_rotate_2d(float deg);
71 
72 /* Projection Matrix (2D or 3D). */
73 
75 void GPU_matrix_pop_projection(void);
76 
77 /* 3D Projection Matrix. */
78 
80 void GPU_matrix_projection_set(const float m[4][4]);
81 
82 void GPU_matrix_ortho_set(float left, float right, float bottom, float top, float near, float far);
83 void GPU_matrix_ortho_set_z(float near, float far);
84 
86  float left, float right, float bottom, float top, float near, float far);
87 void GPU_matrix_perspective_set(float fovy, float aspect, float near, float far);
88 
89 /* 3D Projection between Window and World Space */
90 
92  float model_inverted[4][4];
93  float view[4];
94  bool is_persp;
100  struct {
101  double xmin, xmax;
102  double ymin, ymax;
103  double zmin, zmax;
104  } dims;
105 };
106 
108  const float model[4][4],
109  const float proj[4][4],
110  const int view[4]);
111 
112 void GPU_matrix_project_3fv(const float world[3],
113  const float model[4][4],
114  const float proj[4][4],
115  const int view[4],
116  float r_win[3]);
117 
118 void GPU_matrix_project_2fv(const float world[3],
119  const float model[4][4],
120  const float proj[4][4],
121  const int view[4],
122  float r_win[2]);
123 
124 bool GPU_matrix_unproject_3fv(const float win[3],
125  const float model_inverted[4][4],
126  const float proj[4][4],
127  const int view[4],
128  float r_world[3]);
129 
130 /* 2D Projection Matrix. */
131 
132 void GPU_matrix_ortho_2d_set(float left, float right, float bottom, float top);
133 
134 /* Functions to get matrix values. */
135 
136 const float (*GPU_matrix_model_view_get(float m[4][4]))[4];
137 const float (*GPU_matrix_projection_get(float m[4][4]))[4];
138 const float (*GPU_matrix_model_view_projection_get(float m[4][4]))[4];
139 
140 const float (*GPU_matrix_normal_get(float m[3][3]))[3];
141 const float (*GPU_matrix_normal_inverse_get(float m[3][3]))[3];
142 
146 void GPU_matrix_bind(struct GPUShader *shader);
147 bool GPU_matrix_dirty_get(void); /* since last bind */
148 
152 float GPU_polygon_offset_calc(const float (*winmat)[4], float viewdist, float dist);
156 void GPU_polygon_offset(float viewdist, float dist);
157 
158 /* Python API needs to be able to inspect the stack so errors raise exceptions
159  * instead of crashing. */
160 #ifdef USE_GPU_PY_MATRIX_API
163 /* static assert ensures this doesn't change! */
164 # define GPU_PY_MATRIX_STACK_LEN 31
165 #endif /* USE_GPU_PY_MATRIX_API */
166 
167 #ifdef __cplusplus
168 }
169 #endif
170 
171 #ifndef SUPPRESS_GENERIC_MATRIX_API
172 
173 # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
174 # define _GPU_MAT3_CONST_CAST(x) \
175  (_Generic((x), \
176  void *: (const float (*)[3])(x), \
177  float *: (const float (*)[3])(x), \
178  float [9]: (const float (*)[3])(x), \
179  float (*)[4]: (const float (*)[3])(x), \
180  float [4][4]: (const float (*)[3])(x), \
181  const void *: (const float (*)[3])(x), \
182  const float *: (const float (*)[3])(x), \
183  const float [9]: (const float (*)[3])(x), \
184  const float (*)[3]: (const float (*)[3])(x), \
185  const float [3][3]: (const float (*)[3])(x)) \
186 )
187 # define _GPU_MAT3_CAST(x) \
188  (_Generic((x), \
189  void *: (float (*)[3])(x), \
190  float *: (float (*)[3])(x), \
191  float [9]: (float (*)[3])(x), \
192  float (*)[3]: (float (*)[3])(x), \
193  float [3][3]: (float (*)[3])(x)) \
194 )
195 # define _GPU_MAT4_CONST_CAST(x) \
196  (_Generic((x), \
197  void *: (const float (*)[4])(x), \
198  float *: (const float (*)[4])(x), \
199  float [16]: (const float (*)[4])(x), \
200  float (*)[4]: (const float (*)[4])(x), \
201  float [4][4]: (const float (*)[4])(x), \
202  const void *: (const float (*)[4])(x), \
203  const float *: (const float (*)[4])(x), \
204  const float [16]: (const float (*)[4])(x), \
205  const float (*)[4]: (const float (*)[4])(x), \
206  const float [4][4]: (const float (*)[4])(x)) \
207 )
208 # define _GPU_MAT4_CAST(x) \
209  (_Generic((x), \
210  void *: (float (*)[4])(x), \
211  float *: (float (*)[4])(x), \
212  float [16]: (float (*)[4])(x), \
213  float (*)[4]: (float (*)[4])(x), \
214  float [4][4]: (float (*)[4])(x)) \
215 )
216 # else
217 # define _GPU_MAT3_CONST_CAST(x) (const float(*)[3])(x)
218 # define _GPU_MAT3_CAST(x) (float(*)[3])(x)
219 # define _GPU_MAT4_CONST_CAST(x) (const float(*)[4])(x)
220 # define _GPU_MAT4_CAST(x) (float(*)[4])(x)
221 # endif /* C11 */
222 
223 /* make matrix inputs generic, to avoid warnings */
224 # define GPU_matrix_mul(x) GPU_matrix_mul(_GPU_MAT4_CONST_CAST(x))
225 # define GPU_matrix_set(x) GPU_matrix_set(_GPU_MAT4_CONST_CAST(x))
226 # define GPU_matrix_projection_set(x) GPU_matrix_projection_set(_GPU_MAT4_CONST_CAST(x))
227 # define GPU_matrix_model_view_get(x) GPU_matrix_model_view_get(_GPU_MAT4_CAST(x))
228 # define GPU_matrix_projection_get(x) GPU_matrix_projection_get(_GPU_MAT4_CAST(x))
229 # define GPU_matrix_model_view_projection_get(x) \
230  GPU_matrix_model_view_projection_get(_GPU_MAT4_CAST(x))
231 # define GPU_matrix_normal_get(x) GPU_matrix_normal_get(_GPU_MAT3_CAST(x))
232 # define GPU_matrix_normal_inverse_get(x) GPU_matrix_normal_inverse_get(_GPU_MAT3_CAST(x))
233 #endif /* SUPPRESS_GENERIC_MATRIX_API */
234 
235 /* Not part of the GPU_matrix API,
236  * however we need to check these limits in code that calls into these API's. */
237 #define GPU_MATRIX_ORTHO_CLIP_NEAR_DEFAULT (-100)
238 #define GPU_MATRIX_ORTHO_CLIP_FAR_DEFAULT (100)
typedef float(TangentPoint)[2]
static AppView * view
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble z
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble right
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble top
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble bottom
void GPU_matrix_look_at(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ)
Definition: gpu_matrix.cc:437
void GPU_matrix_pop(void)
Definition: gpu_matrix.cc:126
#define GPU_matrix_normal_get(x)
Definition: GPU_matrix.h:231
bool GPU_matrix_dirty_get(void)
Definition: gpu_matrix.cc:655
void GPU_matrix_translate_2fv(const float vec[2])
Definition: gpu_matrix.cc:183
void GPU_matrix_rotate_axis(float deg, char axis)
Definition: gpu_matrix.cc:274
float GPU_polygon_offset_calc(const float(*winmat)[4], float viewdist, float dist)
Definition: gpu_matrix.cc:690
#define GPU_matrix_model_view_get(x)
Definition: GPU_matrix.h:227
void GPU_matrix_project_2fv(const float world[3], const float model[4][4], const float proj[4][4], const int view[4], float r_win[2])
Definition: gpu_matrix.cc:481
void GPU_matrix_ortho_set(float left, float right, float bottom, float top, float near, float far)
Definition: gpu_matrix.cc:399
void GPU_matrix_scale_2f(float x, float y)
Definition: gpu_matrix.cc:216
void GPU_matrix_perspective_set(float fovy, float aspect, float near, float far)
Definition: gpu_matrix.cc:430
void GPU_matrix_identity_projection_set(void)
Definition: gpu_matrix.cc:154
void GPU_matrix_pop_projection(void)
Definition: gpu_matrix.cc:140
void GPU_matrix_scale_2fv(const float vec[2])
Definition: gpu_matrix.cc:226
#define GPU_matrix_set(x)
Definition: GPU_matrix.h:225
void GPU_matrix_frustum_set(float left, float right, float bottom, float top, float near, float far)
Definition: gpu_matrix.cc:422
void GPU_matrix_ortho_set_z(float near, float far)
Definition: gpu_matrix.cc:406
void GPU_matrix_ortho_2d_set(float left, float right, float bottom, float top)
Definition: gpu_matrix.cc:414
#define GPU_matrix_mul(x)
Definition: GPU_matrix.h:224
void GPU_matrix_scale_3fv(const float vec[3])
Definition: gpu_matrix.cc:241
void GPU_matrix_scale_3f(float x, float y, float z)
Definition: gpu_matrix.cc:231
#define GPU_matrix_normal_inverse_get(x)
Definition: GPU_matrix.h:232
void GPU_matrix_push(void)
Definition: gpu_matrix.cc:119
void GPU_matrix_scale_1f(float factor)
Definition: gpu_matrix.cc:209
void GPU_matrix_rotate_3fv(float deg, const float axis[3])
Definition: gpu_matrix.cc:267
void GPU_matrix_rotate_2d(float deg)
Definition: gpu_matrix.cc:253
#define GPU_matrix_projection_get(x)
Definition: GPU_matrix.h:228
void GPU_matrix_bind(struct GPUShader *shader)
Definition: gpu_matrix.cc:611
void GPU_matrix_reset(void)
Definition: gpu_matrix.cc:86
#define GPU_matrix_projection_set(x)
Definition: GPU_matrix.h:226
bool GPU_matrix_unproject_3fv(const float win[3], const float model_inverted[4][4], const float proj[4][4], const int view[4], float r_world[3])
Definition: gpu_matrix.cc:500
#define GPU_matrix_model_view_projection_get(x)
Definition: GPU_matrix.h:229
void GPU_matrix_translate_3fv(const float vec[3])
Definition: gpu_matrix.cc:204
void GPU_matrix_translate_3f(float x, float y, float z)
Definition: gpu_matrix.cc:188
void GPU_polygon_offset(float viewdist, float dist)
Definition: gpu_matrix.cc:721
void GPU_matrix_rotate_3f(float deg, float x, float y, float z)
Definition: gpu_matrix.cc:261
void GPU_matrix_identity_set(void)
Definition: gpu_matrix.cc:168
void GPU_matrix_project_3fv(const float world[3], const float model[4][4], const float proj[4][4], const int view[4], float r_win[3])
Definition: gpu_matrix.cc:461
void GPU_matrix_translate_2f(float x, float y)
Definition: gpu_matrix.cc:174
void GPU_matrix_push_projection(void)
Definition: gpu_matrix.cc:133
bool GPU_matrix_unproject_precalc(struct GPUMatrixUnproject_Precalc *unproj_precalc, const float model[4][4], const float proj[4][4], const int view[4])
struct GPUShader GPUShader
Definition: GPU_shader.h:20
World world
int GPU_matrix_stack_level_get_projection()
Definition: gpu_matrix.cc:675
int GPU_matrix_stack_level_get_model_view()
Definition: gpu_matrix.cc:669
static int left
struct GPUMatrixUnproject_Precalc::@650 dims
float model_inverted[4][4]
Definition: GPU_matrix.h:92