check return value of invert_matrix()

This commit is contained in:
Jonathan Bestien-Filiatrault 2007-09-12 16:21:13 -06:00 committed by Brian
parent ae0dd620fe
commit 5fdeb52e5d
3 changed files with 9 additions and 5 deletions

View file

@ -23,7 +23,7 @@ C_SOURCES = \
OBJECTS = $(C_SOURCES:.c=.o)
INCLUDES = -I. -I- -I$(TOP)/include
INCLUDES = -I. -I$(TOP)/include
##### RULES #####

View file

@ -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);

View file

@ -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);