From 9b6c2bbb21284754f6a47916c0c2eb50b38f8d8f Mon Sep 17 00:00:00 2001 From: T_chan Date: Tue, 18 Jan 2022 21:40:31 +0000 Subject: [PATCH] Add glTexCoord1f() and glTexCoord1fv() --- GL/immediate.c | 10 ++++++++++ include/GL/gl.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/GL/immediate.c b/GL/immediate.c index cfbf0b1..9482c33 100644 --- a/GL/immediate.c +++ b/GL/immediate.c @@ -224,6 +224,16 @@ void APIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t) { } } +void APIENTRY glTexCoord1f(GLfloat u) { + IM_ENABLED_VERTEX_ATTRIBUTES |= UV_ENABLED_FLAG; + UV_COORD[0] = u; + UV_COORD[1] = 0.0f; +} + +void APIENTRY glTexCoord1fv(const GLfloat* v) { + glTexCoord1f(v[0]); +} + void APIENTRY glTexCoord2f(GLfloat u, GLfloat v) { IM_ENABLED_VERTEX_ATTRIBUTES |= UV_ENABLED_FLAG; UV_COORD[0] = u; diff --git a/include/GL/gl.h b/include/GL/gl.h index 1fb20a8..ea295ed 100644 --- a/include/GL/gl.h +++ b/include/GL/gl.h @@ -437,6 +437,8 @@ GLAPI void APIENTRY glBegin(GLenum mode); GLAPI void APIENTRY glEnd(); /* Primitive Texture Coordinate Submission */ +GLAPI void APIENTRY glTexCoord1f(GLfloat u); +GLAPI void APIENTRY glTexCoord1fv(const GLfloat *u); GLAPI void APIENTRY glTexCoord2f(GLfloat u, GLfloat v); GLAPI void APIENTRY glTexCoord2fv(const GLfloat *uv);