]> git.sesse.net Git - movit/blob - util.h
Move the Effect class out into its own file.
[movit] / util.h
1 #ifndef _UTIL_H
2 #define _UTIL_H 1
3
4 #include <stdio.h>
5 #include <stdlib.h>
6
7 // assumes h in [0, 2pi> or [-pi, pi>
8 void hsv2rgb(float h, float s, float v, float *r, float *g, float *b);
9
10 #ifdef NDEBUG
11 #define check_error()
12 #else
13 #define check_error() { int err = glGetError(); if (err != GL_NO_ERROR) { printf("GL error 0x%x at line %d\n", err, __LINE__); exit(1); } }
14 #endif
15
16 #endif // !defined(_UTIL_H)