mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
LibGL: Implement glLightModelf
and glLightModelfv
This commit is contained in:
parent
0453cad46c
commit
c2960e68a8
5 changed files with 49 additions and 1 deletions
|
@ -2345,6 +2345,27 @@ void SoftwareGLContext::gl_pop_attrib()
|
|||
dbgln_if(GL_DEBUG, "SoftwareGLContext FIXME: implement gl_pop_attrib()");
|
||||
}
|
||||
|
||||
void SoftwareGLContext::gl_light_model(GLenum pname, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
|
||||
{
|
||||
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_light_model, pname, x, y, z, w);
|
||||
|
||||
RETURN_WITH_ERROR_IF(!(pname == GL_LIGHT_MODEL_AMBIENT
|
||||
|| pname == GL_LIGHT_MODEL_TWO_SIDE),
|
||||
GL_INVALID_ENUM);
|
||||
|
||||
switch (pname) {
|
||||
case GL_LIGHT_MODEL_AMBIENT:
|
||||
m_light_model_ambient = { x, y, z, w };
|
||||
break;
|
||||
case GL_LIGHT_MODEL_TWO_SIDE:
|
||||
VERIFY(y == 0.0f && z == 0.0f && w == 0.0f);
|
||||
m_light_model_two_side = x;
|
||||
break;
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
}
|
||||
|
||||
void SoftwareGLContext::present()
|
||||
{
|
||||
m_rasterizer.blit_to(*m_frontbuffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue