mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +00:00
LibSoftGPU: Remove OpenGL type for polygon mode
Replaces the GLenum used to setup polygon mode in RasterizerOptions with our own enum.
This commit is contained in:
parent
f4d29bf665
commit
de0069188f
Notes:
sideshowbarker
2024-07-17 22:15:07 +09:00
Author: https://github.com/sunverwerth
Commit: de0069188f
Pull-request: https://github.com/SerenityOS/serenity/pull/11288
Reviewed-by: https://github.com/Quaker762 ✅
Reviewed-by: https://github.com/gmta
2 changed files with 20 additions and 2 deletions
|
@ -2293,7 +2293,19 @@ void SoftwareGLContext::gl_polygon_mode(GLenum face, GLenum mode)
|
|||
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
|
||||
|
||||
auto options = m_rasterizer.options();
|
||||
options.polygon_mode = mode;
|
||||
|
||||
// FIXME: This must support different polygon modes for front- and backside
|
||||
switch (mode) {
|
||||
case GL_POINT:
|
||||
options.polygon_mode = SoftGPU::PolygonMode::Point;
|
||||
break;
|
||||
case GL_LINE:
|
||||
options.polygon_mode = SoftGPU::PolygonMode::Line;
|
||||
break;
|
||||
case GL_FILL:
|
||||
options.polygon_mode = SoftGPU::PolygonMode::Fill;
|
||||
break;
|
||||
}
|
||||
|
||||
m_rasterizer.set_options(options);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue