aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mgl/gl.h4
-rw-r--r--include/mgl/graphics/color.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/include/mgl/gl.h b/include/mgl/gl.h
index 36b2743..6de98d9 100644
--- a/include/mgl/gl.h
+++ b/include/mgl/gl.h
@@ -2,6 +2,7 @@
#define MGL_GL_H
#include "gl_macro.h"
+#include <stdint.h>
typedef struct _XVisualInfo _XVisualInfo;
typedef struct _XDisplay Display;
@@ -31,9 +32,8 @@ typedef struct {
void (*glHint)(unsigned int target, unsigned int mode);
void (*glBegin)(unsigned int mode);
void (*glEnd)(void);
- void (*glColor3f)(float red, float green, float blue);
void (*glVertex3f)(float x, float y, float z);
- void (*glColor4f)(float red, float green, float blue, float alpha);
+ void (*glColor4ub)(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha);
void (*glTexCoord2f)(float s, float t);
void (*glOrtho)(double left, double right, double bottom, double top, double near_val, double far_val);
void (*glMatrixMode)(unsigned int mode);
diff --git a/include/mgl/graphics/color.h b/include/mgl/graphics/color.h
index 62ded72..68cc0c1 100644
--- a/include/mgl/graphics/color.h
+++ b/include/mgl/graphics/color.h
@@ -1,8 +1,10 @@
#ifndef MGL_COLOR_H
#define MGL_COLOR_H
+#include <stdint.h>
+
typedef struct {
- float r, g, b, a;
+ uint8_t r, g, b, a;
} mgl_color;
#endif /* MGL_COLOR_H */