LibGL: Fix clipping and interpolate vertex attributes

The previous clipping implementation was problematic especially when
clipping against the near plane. Triangles are now correctly clipped
using homogenous coordinates against all frustum planes.

Texture coordinates and vertex colors are now correctly interpolated.
The earier implementation was just a placeholder.
This commit is contained in:
Stephan Unverwerth 2021-08-16 19:22:08 +02:00 committed by Andreas Kling
commit 220ac5eb02
Notes: sideshowbarker 2024-07-18 05:30:19 +09:00
6 changed files with 111 additions and 205 deletions

View file

@ -126,6 +126,7 @@ private:
Vector<GLVertex, 96> vertex_list;
Vector<GLTriangle, 32> triangle_list;
Vector<GLTriangle, 32> processed_triangles;
Vector<GLVertex> m_clipped_vertices;
GLenum m_error = GL_NO_ERROR;
bool m_in_draw_state = false;