summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2021-04-24 17:51:13 +0430
committerAndreas Kling <kling@serenityos.org>2021-05-08 10:13:22 +0200
commit193b53344a20d11d64b78775aaa2f69cc707967b (patch)
tree57f7fc6e3aa8eb942da0f6d432a4c67e559f8734 /Userland
parent6b11a5688dd2514ed9166fef06b4e7a9e0350c79 (diff)
downloadserenity-193b53344a20d11d64b78775aaa2f69cc707967b.zip
LibGL: Implement glVertex2f(v)
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibGL/GL/gl.h2
-rw-r--r--Userland/Libraries/LibGL/GLVert.cpp10
2 files changed, 12 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGL/GL/gl.h b/Userland/Libraries/LibGL/GL/gl.h
index dd3fa6a588..2b392d73ac 100644
--- a/Userland/Libraries/LibGL/GL/gl.h
+++ b/Userland/Libraries/LibGL/GL/gl.h
@@ -87,6 +87,8 @@ GLAPI void glPopMatrix();
GLAPI void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
GLAPI void glScalef(GLfloat x, GLfloat y, GLfloat z);
GLAPI void glTranslatef(GLfloat x, GLfloat y, GLfloat z);
+GLAPI void glVertex2f(GLfloat x, GLfloat y);
+GLAPI void glVertex2fv(const GLfloat* v);
GLAPI void glVertex3f(GLfloat x, GLfloat y, GLfloat z);
GLAPI void glVertex3fv(const GLfloat* v);
GLAPI void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
diff --git a/Userland/Libraries/LibGL/GLVert.cpp b/Userland/Libraries/LibGL/GLVert.cpp
index 6119f53a6b..281207c0ee 100644
--- a/Userland/Libraries/LibGL/GLVert.cpp
+++ b/Userland/Libraries/LibGL/GLVert.cpp
@@ -20,6 +20,16 @@ void glEnd()
g_gl_context->gl_end();
}
+void glVertex2f(GLfloat x, GLfloat y)
+{
+ g_gl_context->gl_vertex(x, y, 0.0, 1.0);
+}
+
+void glVertex2fv(const GLfloat* v)
+{
+ g_gl_context->gl_vertex(v[0], v[1], 0.0, 1.0);
+}
+
void glVertex3f(GLfloat x, GLfloat y, GLfloat z)
{
g_gl_context->gl_vertex(x, y, z, 1.0);