check return value of invert_matrix()
This commit is contained in:
committed by
Brian
parent
ae0dd620fe
commit
5fdeb52e5d
@@ -23,7 +23,7 @@ C_SOURCES = \
|
||||
|
||||
OBJECTS = $(C_SOURCES:.c=.o)
|
||||
|
||||
INCLUDES = -I. -I- -I$(TOP)/include
|
||||
INCLUDES = -I. -I$(TOP)/include
|
||||
|
||||
##### RULES #####
|
||||
|
||||
|
||||
@@ -346,7 +346,8 @@ gluUnProject(GLdouble winx, GLdouble winy, GLdouble winz,
|
||||
|
||||
/* calcul transformation inverse */
|
||||
matmul(A, proj, model);
|
||||
invert_matrix(A, m);
|
||||
if (!invert_matrix(A, m))
|
||||
return GL_FALSE;
|
||||
|
||||
/* d'ou les coordonnees objets */
|
||||
transform_point(out, m, in);
|
||||
@@ -386,7 +387,8 @@ gluUnProject4(GLdouble winx, GLdouble winy, GLdouble winz, GLdouble clipw,
|
||||
|
||||
/* calcul transformation inverse */
|
||||
matmul(A, projMatrix, modelMatrix);
|
||||
invert_matrix(A, m);
|
||||
if (!invert_matrix(A, m))
|
||||
return GL_FALSE;
|
||||
|
||||
/* d'ou les coordonnees objets */
|
||||
transform_point(out, m, in);
|
||||
|
||||
@@ -347,7 +347,8 @@ gluUnProject(GLdouble winx, GLdouble winy, GLdouble winz,
|
||||
|
||||
/* calcul transformation inverse */
|
||||
matmul(A, proj, model);
|
||||
invert_matrix(A, m);
|
||||
if (!invert_matrix(A, m))
|
||||
return GL_FALSE;
|
||||
|
||||
/* d'ou les coordonnees objets */
|
||||
transform_point(out, m, in);
|
||||
@@ -387,7 +388,8 @@ gluUnProject4(GLdouble winx, GLdouble winy, GLdouble winz, GLdouble clipw,
|
||||
|
||||
/* calcul transformation inverse */
|
||||
matmul(A, projMatrix, modelMatrix);
|
||||
invert_matrix(A, m);
|
||||
if (!invert_matrix(A, m))
|
||||
return GL_FALSE;
|
||||
|
||||
/* d'ou les coordonnees objets */
|
||||
transform_point(out, m, in);
|
||||
|
||||
Reference in New Issue
Block a user