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

LibGL: Implement glNormal3f and glNormal3fv

This commit is contained in:
Jelle Raaijmakers 2021-12-01 15:33:23 +01:00 committed by Andreas Kling
parent ea6bcda79c
commit 78d0674228
6 changed files with 27 additions and 1 deletions

View file

@ -514,6 +514,7 @@ void SoftwareGLContext::gl_vertex(GLdouble x, GLdouble y, GLdouble z, GLdouble w
vertex.position = { static_cast<float>(x), static_cast<float>(y), static_cast<float>(z), static_cast<float>(w) };
vertex.color = m_current_vertex_color;
vertex.tex_coord = { m_current_vertex_tex_coord.x(), m_current_vertex_tex_coord.y() };
vertex.normal = m_current_vertex_normal;
vertex_list.append(vertex);
}
@ -2240,6 +2241,13 @@ void SoftwareGLContext::gl_stencil_op_separate(GLenum face, GLenum sfail, GLenum
m_stencil_backfacing_op = new_options;
}
void SoftwareGLContext::gl_normal(GLfloat nx, GLfloat ny, GLfloat nz)
{
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_normal, nx, ny, nz);
m_current_vertex_normal = { nx, ny, nz };
}
void SoftwareGLContext::present()
{
m_rasterizer.blit_to(*m_frontbuffer);