summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/formats.h
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/opengl/formats.h')
-rw-r--r--video/out/opengl/formats.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/video/out/opengl/formats.h b/video/out/opengl/formats.h
index 5bb3bcb4a3..d4d38c1150 100644
--- a/video/out/opengl/formats.h
+++ b/video/out/opengl/formats.h
@@ -2,8 +2,10 @@
#define MPGL_FORMATS_H_
#include "common.h"
+#include "ra.h"
struct gl_format {
+ const char *name; // symbolic name for user interaction/debugging
GLint internal_format; // glTexImage argument
GLenum format; // glTexImage argument
GLenum type; // e.g. GL_UNSIGNED_SHORT
@@ -33,11 +35,13 @@ enum {
// the format is still GL_FLOAT (32 bit)
// --- Other constants.
- MPGL_TYPE_UNORM = 1, // normalized integer (fixed point) formats
- MPGL_TYPE_UINT = 2, // full integer formats
- MPGL_TYPE_FLOAT = 3, // float formats (both full and half)
+ MPGL_TYPE_UNORM = RA_CTYPE_UNORM, // normalized integer (fixed point) formats
+ MPGL_TYPE_UINT = RA_CTYPE_UINT, // full integer formats
+ MPGL_TYPE_FLOAT = RA_CTYPE_FLOAT, // float formats (both full and half)
};
+extern const struct gl_format gl_formats[];
+
int gl_format_feature_flags(GL *gl);
const struct gl_format *gl_find_internal_format(GL *gl, GLint internal_format);
const struct gl_format *gl_find_format(GL *gl, int type, int flags,