summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL/GL
diff options
context:
space:
mode:
authorStephan Unverwerth <s.unverwerth@gmx.de>2021-05-24 16:11:06 +0200
committerLinus Groh <mail@linusgroh.de>2021-05-24 19:03:25 +0100
commitd6c84ca4df9d91f0ab8a871eda228b21893f7371 (patch)
treea7306c0af506fe519622fcf2a275814812dd8b5e /Userland/Libraries/LibGL/GL
parent24e74750d5c31c510bc42b3295f3f618026e57bb (diff)
downloadserenity-d6c84ca4df9d91f0ab8a871eda228b21893f7371.zip
LibGL: Implement glReadPixels() stub with argument validation
Diffstat (limited to 'Userland/Libraries/LibGL/GL')
-rw-r--r--Userland/Libraries/LibGL/GL/gl.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGL/GL/gl.h b/Userland/Libraries/LibGL/GL/gl.h
index b00383a57e..85725e866b 100644
--- a/Userland/Libraries/LibGL/GL/gl.h
+++ b/Userland/Libraries/LibGL/GL/gl.h
@@ -115,6 +115,29 @@ extern "C" {
#define GL_COMPILE 0x1300
#define GL_COMPILE_AND_EXECUTE 0x1301
+// Type enums
+#define GL_BYTE 0x1400
+#define GL_UNSIGNED_BYTE 0x1401
+#define GL_SHORT 0x1402
+#define GL_UNSIGNED_SHORT 0x1403
+#define GL_INT 0x1404
+#define GL_UNSIGNED_INT 0x1405
+#define GL_FLOAT 0x1406
+
+// Format enums
+#define GL_COLOR_INDEX 0x1900
+#define GL_LUMINANCE 0x1909
+#define GL_LUMINANCE_ALPHA 0x190A
+#define GL_BITMAP 0x1A00
+#define GL_STENCIL_INDEX 0x1901
+#define GL_DEPTH_COMPONENT 0x1902
+#define GL_RED 0x1903
+#define GL_GREEN 0x1904
+#define GL_BLUE 0x1905
+#define GL_ALPHA 0x1906
+#define GL_RGB 0x1907
+#define GL_RGBA 0x1908
+
// Lighting related defines
#define GL_FLAT 0x1D00
#define GL_SMOOTH 0x1D01
@@ -211,6 +234,7 @@ GLAPI void glShadeModel(GLenum mode);
GLAPI void glAlphaFunc(GLenum func, GLclampf ref);
GLAPI void glHint(GLenum target, GLenum mode);
GLAPI void glReadBuffer(GLenum mode);
+GLAPI void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
#ifdef __cplusplus
}