LibGL: Implement glTexCoord{1,3,4}f(v)
Not necessarily required by Half-Life's use of Xash3D, but it looks them up anyway and they're easy to implement, so here they are :^).
This commit is contained in:
parent
10a52c0b32
commit
cba1972deb
Notes:
sideshowbarker
2024-07-17 21:01:50 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/cba1972deba Pull-request: https://github.com/SerenityOS/serenity/pull/11824 Reviewed-by: https://github.com/IdanHo Reviewed-by: https://github.com/Quaker762 ✅ Reviewed-by: https://github.com/gmta ✅ Reviewed-by: https://github.com/sunverwerth ✅
2 changed files with 30 additions and 0 deletions
|
@ -536,11 +536,16 @@ GLAPI void glTexImage1D(GLenum target, GLint level, GLint internalFormat, GLsize
|
|||
GLAPI void glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid const* data);
|
||||
GLAPI void glTexImage3D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLvoid const* data);
|
||||
GLAPI void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* data);
|
||||
GLAPI void glTexCoord1f(GLfloat s);
|
||||
GLAPI void glTexCoord1fv(GLfloat const* v);
|
||||
GLAPI void glTexCoord2d(GLdouble s, GLdouble t);
|
||||
GLAPI void glTexCoord2dv(GLdouble const* v);
|
||||
GLAPI void glTexCoord2f(GLfloat s, GLfloat t);
|
||||
GLAPI void glTexCoord2fv(GLfloat const* v);
|
||||
GLAPI void glTexCoord2i(GLint s, GLint t);
|
||||
GLAPI void glTexCoord3f(GLfloat s, GLfloat t, GLfloat r);
|
||||
GLAPI void glTexCoord3fv(GLfloat const* v);
|
||||
GLAPI void glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
|
||||
GLAPI void glTexCoord4fv(const GLfloat* v);
|
||||
GLAPI void glTexParameteri(GLenum target, GLenum pname, GLint param);
|
||||
GLAPI void glTexParameterf(GLenum target, GLenum pname, GLfloat param);
|
||||
|
|
|
@ -140,6 +140,16 @@ void glVertex4sv(const GLshort* v)
|
|||
g_gl_context->gl_vertex(v[0], v[1], v[2], v[3]);
|
||||
}
|
||||
|
||||
void glTexCoord1f(GLfloat s)
|
||||
{
|
||||
g_gl_context->gl_tex_coord(s, 0.0f, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
void glTexCoord1fv(GLfloat const* v)
|
||||
{
|
||||
g_gl_context->gl_tex_coord(v[0], 0.0f, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
void glTexCoord2d(GLdouble s, GLdouble t)
|
||||
{
|
||||
g_gl_context->gl_tex_coord(s, t, 0.0f, 1.0f);
|
||||
|
@ -165,6 +175,21 @@ void glTexCoord2i(GLint s, GLint t)
|
|||
g_gl_context->gl_tex_coord(s, t, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
void glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
|
||||
{
|
||||
g_gl_context->gl_tex_coord(s, t, r, 1.0f);
|
||||
}
|
||||
|
||||
void glTexCoord3fv(GLfloat const* v)
|
||||
{
|
||||
g_gl_context->gl_tex_coord(v[0], v[1], v[2], 1.0f);
|
||||
}
|
||||
|
||||
void glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
|
||||
{
|
||||
g_gl_context->gl_tex_coord(s, t, r, q);
|
||||
}
|
||||
|
||||
void glTexCoord4fv(const GLfloat* v)
|
||||
{
|
||||
g_gl_context->gl_tex_coord(v[0], v[1], v[2], v[3]);
|
||||
|
|
Loading…
Add table
Reference in a new issue