LibGL: Implement glVertex2f(v)

This commit is contained in:
Ali Mohammad Pur 2021-04-24 17:51:13 +04:30 committed by Andreas Kling
parent 6b11a5688d
commit 193b53344a
2 changed files with 12 additions and 0 deletions

View file

@ -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);

View file

@ -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);