From 59fc2a4aad6a56f7017ed75a509acd2b07d26656 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Tue, 13 Sep 2022 09:56:35 +0200 Subject: [PATCH] LibGL: Implement all `glRasterPos2*` API methods --- Userland/Libraries/LibGL/GL/gl.h | 3 +++ Userland/Libraries/LibGL/GLAPI.cpp | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGL/GL/gl.h b/Userland/Libraries/LibGL/GL/gl.h index bc40fda8f5..b5c0b48c0b 100644 --- a/Userland/Libraries/LibGL/GL/gl.h +++ b/Userland/Libraries/LibGL/GL/gl.h @@ -747,7 +747,10 @@ GLAPI void glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz); GLAPI void glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz); GLAPI void glNormal3fv(GLfloat const* v); GLAPI void glNormalPointer(GLenum type, GLsizei stride, void const* pointer); +GLAPI void glRasterPos2d(GLdouble x, GLdouble y); +GLAPI void glRasterPos2f(GLfloat x, GLfloat y); GLAPI void glRasterPos2i(GLint x, GLint y); +GLAPI void glRasterPos2s(GLshort x, GLshort y); GLAPI void glMaterialf(GLenum face, GLenum pname, GLfloat param); GLAPI void glMaterialfv(GLenum face, GLenum pname, GLfloat const* params); GLAPI void glMateriali(GLenum face, GLenum pname, GLint param); diff --git a/Userland/Libraries/LibGL/GLAPI.cpp b/Userland/Libraries/LibGL/GLAPI.cpp index b71c7637bd..ca4e94cd06 100644 --- a/Userland/Libraries/LibGL/GLAPI.cpp +++ b/Userland/Libraries/LibGL/GLAPI.cpp @@ -731,9 +731,24 @@ void glPushMatrix() g_gl_context->gl_push_matrix(); } +void glRasterPos2d(GLdouble x, GLdouble y) +{ + g_gl_context->gl_raster_pos(static_cast(x), static_cast(y), 0.f, 1.f); +} + +void glRasterPos2f(GLfloat x, GLfloat y) +{ + g_gl_context->gl_raster_pos(x, y, 0.f, 1.f); +} + void glRasterPos2i(GLint x, GLint y) { - g_gl_context->gl_raster_pos(static_cast(x), static_cast(y), 0.0f, 1.0f); + g_gl_context->gl_raster_pos(static_cast(x), static_cast(y), 0.f, 1.f); +} + +void glRasterPos2s(GLshort x, GLshort y) +{ + g_gl_context->gl_raster_pos(static_cast(x), static_cast(y), 0.f, 1.f); } void glReadBuffer(GLenum mode)