LibGL: Implement all glRasterPos2* API methods

This commit is contained in:
Jelle Raaijmakers 2022-09-13 09:56:35 +02:00 committed by Andreas Kling
parent 7e85ec3431
commit 59fc2a4aad
Notes: sideshowbarker 2024-07-17 07:13:03 +09:00
2 changed files with 19 additions and 1 deletions

View File

@ -747,7 +747,10 @@ GLAPI void glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz);
GLAPI void glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz);
GLAPI void glNormal3fv(GLfloat const* v);
GLAPI void glNormalPointer(GLenum type, GLsizei stride, void const* pointer);
GLAPI void glRasterPos2d(GLdouble x, GLdouble y);
GLAPI void glRasterPos2f(GLfloat x, GLfloat y);
GLAPI void glRasterPos2i(GLint x, GLint y);
GLAPI void glRasterPos2s(GLshort x, GLshort y);
GLAPI void glMaterialf(GLenum face, GLenum pname, GLfloat param);
GLAPI void glMaterialfv(GLenum face, GLenum pname, GLfloat const* params);
GLAPI void glMateriali(GLenum face, GLenum pname, GLint param);

View File

@ -731,9 +731,24 @@ void glPushMatrix()
g_gl_context->gl_push_matrix();
}
void glRasterPos2d(GLdouble x, GLdouble y)
{
g_gl_context->gl_raster_pos(static_cast<float>(x), static_cast<float>(y), 0.f, 1.f);
}
void glRasterPos2f(GLfloat x, GLfloat y)
{
g_gl_context->gl_raster_pos(x, y, 0.f, 1.f);
}
void glRasterPos2i(GLint x, GLint y)
{
g_gl_context->gl_raster_pos(static_cast<float>(x), static_cast<float>(y), 0.0f, 1.0f);
g_gl_context->gl_raster_pos(static_cast<float>(x), static_cast<float>(y), 0.f, 1.f);
}
void glRasterPos2s(GLshort x, GLshort y)
{
g_gl_context->gl_raster_pos(static_cast<float>(x), static_cast<float>(y), 0.f, 1.f);
}
void glReadBuffer(GLenum mode)