mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:18:12 +00:00
LibGL: Implement GL_POLYGON
rendering
This is a deprecated feature that is still in use in some older games, most notably Grim Fandango in ScummVM makes heavy use of it. Luckily, since you can only draw convex polygons, the end result is exactly the same as when you would have used `glBegin(GL_TRIANGLE_FAN)` - so we just reuse that code as-is.
This commit is contained in:
parent
604eea5827
commit
a1fb16e89c
1 changed files with 1 additions and 1 deletions
|
@ -256,7 +256,7 @@ void SoftwareGLContext::gl_end()
|
|||
triangle.vertices[2] = vertex_list.at(i);
|
||||
triangle_list.append(triangle);
|
||||
}
|
||||
} else if (m_current_draw_mode == GL_TRIANGLE_FAN) {
|
||||
} else if (m_current_draw_mode == GL_TRIANGLE_FAN || m_current_draw_mode == GL_POLYGON) {
|
||||
GLTriangle triangle;
|
||||
triangle.vertices[0] = vertex_list.at(0); // Root vertex is always the vertex defined first
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue