Blender V5.3
GPU_matrix.hh File Reference

Go to the source code of this file.

Classes

struct  blender::GPUMatrixUnproject_Precalc

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::gpu

Macros

#define _GPU_MAT3_CONST_CAST(x)
#define _GPU_MAT3_CAST(x)
#define _GPU_MAT4_CONST_CAST(x)
#define _GPU_MAT4_CAST(x)
#define GPU_matrix_mul(x)
#define GPU_matrix_set(x)
#define GPU_matrix_projection_set(x)
#define GPU_matrix_model_view_get(x)
#define GPU_matrix_projection_get(x)
#define GPU_matrix_model_view_projection_get(x)
#define GPU_matrix_normal_get(x)
#define GPU_matrix_normal_inverse_get(x)

Functions

void blender::GPU_matrix_reset ()
void blender::GPU_matrix_push ()
void blender::GPU_matrix_pop ()
void blender::GPU_matrix_identity_set ()
void blender::GPU_matrix_scale_1f (float factor)
void blender::GPU_matrix_set (const float m[4][4])
void blender::GPU_matrix_mul (const float m[4][4])
void blender::GPU_matrix_translate_3f (float x, float y, float z)
void blender::GPU_matrix_translate_3fv (const float vec[3])
void blender::GPU_matrix_scale_3f (float x, float y, float z)
void blender::GPU_matrix_scale_3fv (const float vec[3])
void blender::GPU_matrix_rotate_3f (float deg, float x, float y, float z)
void blender::GPU_matrix_rotate_3fv (float deg, const float axis[3])
void blender::GPU_matrix_rotate_axis (float deg, char axis)
void blender::GPU_matrix_look_at (float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ)
void blender::GPU_matrix_translate_2f (float x, float y)
void blender::GPU_matrix_translate_2fv (const float vec[2])
void blender::GPU_matrix_scale_2f (float x, float y)
void blender::GPU_matrix_scale_2fv (const float vec[2])
void blender::GPU_matrix_rotate_2d (float deg)
void blender::GPU_matrix_push_projection ()
void blender::GPU_matrix_pop_projection ()
void blender::GPU_matrix_identity_projection_set ()
void blender::GPU_matrix_projection_set (const float m[4][4])
void blender::GPU_matrix_ortho_set (float left, float right, float bottom, float top, float near, float far)
void blender::GPU_matrix_ortho_set_z (float near, float far)
void blender::GPU_matrix_frustum_set (float left, float right, float bottom, float top, float near, float far)
void blender::GPU_matrix_perspective_set (float fovy, float aspect, float near, float far)
bool blender::GPU_matrix_unproject_precalc (GPUMatrixUnproject_Precalc *unproj_precalc, const float model[4][4], const float proj[4][4], const int view[4])
void blender::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])
void blender::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])
bool blender::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])
void blender::GPU_matrix_ortho_2d_set (float left, float right, float bottom, float top)
const float(* blender::GPU_matrix_model_view_get (float m[4][4]))[4]
const float(* blender::GPU_matrix_projection_get (float m[4][4]))[4]
const float(* blender::GPU_matrix_model_view_projection_get (float m[4][4]))[4]
const float(* blender::GPU_matrix_normal_get (float m[3][3]))[3]
const float(* blender::GPU_matrix_normal_inverse_get (float m[3][3]))[3]
void blender::GPU_matrix_bind (gpu::Shader *shader)
bool blender::GPU_matrix_dirty_get ()
Polygon Offset Hack

Workaround the fact that polygon-offset is implementation dependent. We modify the projection matrix winmat in order to change the final depth a tiny amount.

float blender::GPU_polygon_offset_calc (const float(*winmat)[4], float viewdist, float dist)
void blender::GPU_polygon_offset (float viewdist, float dist)

Variables

static constexpr int blender::GPU_MATRIX_ORTHO_CLIP_NEAR_DEFAULT = -100
static constexpr int blender::GPU_MATRIX_ORTHO_CLIP_FAR_DEFAULT = 100

Macro Definition Documentation

◆ _GPU_MAT3_CAST

#define _GPU_MAT3_CAST ( x)
Value:
(float (*)[3])(x)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float

Definition at line 209 of file GPU_matrix.hh.

◆ _GPU_MAT3_CONST_CAST

#define _GPU_MAT3_CONST_CAST ( x)
Value:
(const float (*)[3])(x)

Definition at line 208 of file GPU_matrix.hh.

◆ _GPU_MAT4_CAST

#define _GPU_MAT4_CAST ( x)
Value:
(float (*)[4])(x)

Definition at line 211 of file GPU_matrix.hh.

◆ _GPU_MAT4_CONST_CAST

#define _GPU_MAT4_CONST_CAST ( x)
Value:
(const float (*)[4])(x)

Definition at line 210 of file GPU_matrix.hh.

◆ GPU_matrix_model_view_get

#define GPU_matrix_model_view_get ( x)
Value:
#define GPU_matrix_model_view_get(x)
#define _GPU_MAT4_CAST(x)

Definition at line 218 of file GPU_matrix.hh.

◆ GPU_matrix_model_view_projection_get

#define GPU_matrix_model_view_projection_get ( x)
Value:

Definition at line 220 of file GPU_matrix.hh.

◆ GPU_matrix_mul

#define GPU_matrix_mul ( x)
Value:
#define GPU_matrix_mul(x)
#define _GPU_MAT4_CONST_CAST(x)

Definition at line 215 of file GPU_matrix.hh.

◆ GPU_matrix_normal_get

#define GPU_matrix_normal_get ( x)
Value:
#define GPU_matrix_normal_get(x)
#define _GPU_MAT3_CAST(x)

Definition at line 222 of file GPU_matrix.hh.

◆ GPU_matrix_normal_inverse_get

#define GPU_matrix_normal_inverse_get ( x)
Value:

Definition at line 223 of file GPU_matrix.hh.

◆ GPU_matrix_projection_get

#define GPU_matrix_projection_get ( x)
Value:

Definition at line 219 of file GPU_matrix.hh.

◆ GPU_matrix_projection_set

#define GPU_matrix_projection_set ( x)
Value:

Definition at line 217 of file GPU_matrix.hh.

◆ GPU_matrix_set

#define GPU_matrix_set ( x)
Value:

Definition at line 216 of file GPU_matrix.hh.