mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:57:45 +00:00
LibGL: Add software rasterizer
This is based mostly on Fabian "ryg" Giesen's 2011 blog series "A trip through the Graphics Pipeline" and Scratchapixel's "Rasterization: a Practical Implementation". The rasterizer processes triangles in grid aligned 16x16 pixel blocks, calculates barycentric coordinates and edge derivatives and interpolates bilinearly across each block. This will theoretically allow for better utilization of modern processor features such as SMT and SIMD, as opposed to a classic scanline based triangle rasterizer. This serves as a starting point to get something on the screen. In the future we might look into properly pipelining the main loop to make the rasterizer more flexible, enabling us to enable/disable certain features at the block rather than the pixel level.
This commit is contained in:
parent
e6c0600499
commit
5ff248649b
8 changed files with 321 additions and 43 deletions
|
@ -22,12 +22,12 @@ void glDisable(GLenum cap)
|
|||
|
||||
void glFrontFace(GLenum mode)
|
||||
{
|
||||
g_gl_context->gl_front_face(mode);
|
||||
g_gl_context->gl_front_face(mode);
|
||||
}
|
||||
|
||||
void glCullFace(GLenum mode)
|
||||
{
|
||||
g_gl_context->gl_cull_face(mode);
|
||||
g_gl_context->gl_cull_face(mode);
|
||||
}
|
||||
|
||||
void glClear(GLbitfield mask)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue