diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-02-25 23:58:23 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-02-26 02:16:46 +0300 |
commit | 2724fad582676d2c164b05fe6fccf7a15d88adba (patch) | |
tree | 350f10451c9220f258eb3c60f5b5270c6c3d0d1a /source/blender/gpu/GPU_matrix.h | |
parent | e9011100f75c22b3a9c9021fd49fb007efa03ed0 (diff) |
OpenGL: replace gluProject and gluUnProject, and simplify surrounding code.
Part of T49042.
Diffstat (limited to 'source/blender/gpu/GPU_matrix.h')
-rw-r--r-- | source/blender/gpu/GPU_matrix.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/gpu/GPU_matrix.h b/source/blender/gpu/GPU_matrix.h index 2bf52c954a0..1be75be1253 100644 --- a/source/blender/gpu/GPU_matrix.h +++ b/source/blender/gpu/GPU_matrix.h @@ -1,6 +1,3 @@ -#ifndef _GPU_MATRIX_H_ -#define _GPU_MATRIX_H_ - /* * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -32,8 +29,11 @@ * \ingroup gpu */ +#ifndef _GPU_MATRIX_H_ +#define _GPU_MATRIX_H_ + +#include "BLI_sys_types.h" #include "GPU_glew.h" -#include <stdbool.h> #ifdef __cplusplus extern "C" { @@ -110,12 +110,10 @@ void gpuOrtho(float left, float right, float bottom, float top, float near, floa void gpuFrustum(float left, float right, float bottom, float top, float near, float far); void gpuPerspective(float fovy, float aspect, float near, float far); -/* pass vector through current transform (world --> screen) */ -void gpuProject(const float obj[3], const float model[4][4], const float proj[4][4], const GLint view[4], float win[3]); - -/* pass vector through inverse transform (world <-- screen) */ -bool gpuUnProject(const float win[3], const float model[4][4], const float proj[4][4], const GLint view[4], float obj[3]); +/* 3D Projection between Window and World Space */ +void gpuProject(const float world[3], const float model[4][4], const float proj[4][4], const int view[4], float win[3]); +bool gpuUnProject(const float win[3], const float model[4][4], const float proj[4][4], const int view[4], float world[3]); /* 2D Projection Matrix */ |