aboutsummaryrefslogtreecommitdiff
path: root/src/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.c')
-rw-r--r--src/error.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/error.c b/src/error.c
index 17e2611..7f0a65e 100644
--- a/src/error.c
+++ b/src/error.c
@@ -6,7 +6,7 @@
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/05/11 01:43:45 by charles #+# #+# */
-/* Updated: 2020/05/11 01:55:03 by charles ### ########.fr */
+/* Updated: 2020/05/11 10:42:05 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -28,6 +28,21 @@ void error_check(char *code, char *filename, int line_num)
{
ft_putstr("[ERROR opengl] (");
ft_putnbr(err);
+ if (err == GL_INVALID_OPERATION)
+ {
+ ft_putchar(' ');
+ ft_putstr("GL_INVALID_OPERATION");
+ }
+ else if (err == GL_INVALID_VALUE)
+ {
+ ft_putchar(' ');
+ ft_putstr("GL_INVALID_VALUE");
+ }
+ else if (err == GL_INVALID_ENUM)
+ {
+ ft_putchar(' ');
+ ft_putstr("GL_INVALID_ENUM");
+ }
ft_putstr(") ");
ft_putstr(code);
ft_putstr(" at ");