Skip to content

Commit

Permalink
More stubs and wrapper functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mardy committed May 20, 2024
1 parent 223fd7e commit 171c581
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/gc_gl.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,11 @@ void glColor4fv(const GLfloat *v)
glparamstate.imm_mode.current_color[3] = clampf_01(v[3]);
}

void glColor3fv(const GLfloat *v)
{
glColor3f(v[0], v[1], v[2]);
}

void glTexCoord2d(GLdouble u, GLdouble v)
{
glTexCoord2f(u, v);
Expand All @@ -739,6 +744,14 @@ void glTexCoord2f(GLfloat u, GLfloat v)
glparamstate.imm_mode.current_texcoord[1] = v;
}

void glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
{
glTexCoord2f(s, t);
if (r != 0.0) {
warning("glTexCoord3f not supported");
}
}

void glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
{
glparamstate.imm_mode.current_normal[0] = nx;
Expand Down Expand Up @@ -798,6 +811,11 @@ void glVertex3f(GLfloat x, GLfloat y, GLfloat z)
vert[11] = z;
}

void glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
glVertex3f(x / w, y / w, z / w);
}

void glMatrixMode(GLenum mode)
{
switch (mode) {
Expand Down Expand Up @@ -2616,8 +2634,11 @@ void glGetFloatv(GLenum pname, GLfloat *params)

// TODO STUB IMPLEMENTATION

void glClipPlane(GLenum plane, const GLdouble *equation) {}
const GLubyte *glGetString(GLenum name) { return gl_null_string; }
void glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params) {}
void glLightModelf(GLenum pname, GLfloat param) {}
void glLightModeli(GLenum pname, GLint param) {}
void glPushAttrib(GLbitfield mask) {}
void glPopAttrib(void) {}
void glPolygonMode(GLenum face, GLenum mode) {}
Expand Down

0 comments on commit 171c581

Please sign in to comment.