mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:58:12 +00:00
LibGL: Implement glFogi
This commit is contained in:
parent
f55d2a22af
commit
d73cc3d0eb
6 changed files with 27 additions and 0 deletions
|
@ -1783,6 +1783,24 @@ void SoftwareGLContext::gl_fogf(GLenum pname, GLfloat param)
|
|||
m_rasterizer.set_options(options);
|
||||
}
|
||||
|
||||
void SoftwareGLContext::gl_fogi(GLenum pname, GLint param)
|
||||
{
|
||||
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
|
||||
RETURN_WITH_ERROR_IF(!(param == GL_EXP || param == GL_EXP2 || param != GL_LINEAR), GL_INVALID_ENUM);
|
||||
|
||||
auto options = m_rasterizer.options();
|
||||
|
||||
switch (pname) {
|
||||
case GL_FOG_MODE:
|
||||
options.fog_mode = param;
|
||||
break;
|
||||
default:
|
||||
RETURN_WITH_ERROR_IF(true, GL_INVALID_ENUM);
|
||||
}
|
||||
|
||||
m_rasterizer.set_options(options);
|
||||
}
|
||||
|
||||
void SoftwareGLContext::present()
|
||||
{
|
||||
m_rasterizer.blit_to(*m_frontbuffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue