1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:07:35 +00:00

LibGL: Implement glVertexPointer

This commit is contained in:
Stephan Unverwerth 2021-08-13 13:03:06 +02:00 committed by Andreas Kling
parent 886f154c2a
commit 07b9cba6e6
6 changed files with 43 additions and 0 deletions

View file

@ -1447,6 +1447,20 @@ void SoftwareGLContext::gl_disable_client_state(GLenum cap)
}
}
void SoftwareGLContext::gl_vertex_pointer(GLint size, GLenum type, GLsizei stride, const void* pointer)
{
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
RETURN_WITH_ERROR_IF(!(size == 1 || size == 2 || size == 4), GL_INVALID_VALUE);
RETURN_WITH_ERROR_IF(!(type == GL_SHORT || type == GL_INT || type == GL_FLOAT || type == GL_DOUBLE), GL_INVALID_ENUM);
RETURN_WITH_ERROR_IF(stride < 0, GL_INVALID_VALUE);
m_client_vertex_pointer.size = size;
m_client_vertex_pointer.type = type;
m_client_vertex_pointer.stride = stride;
m_client_vertex_pointer.pointer = pointer;
}
void SoftwareGLContext::present()
{
m_rasterizer.blit_to(*m_frontbuffer);