Age | Commit message (Collapse) | Author |
|
|
|
|
|
We support three of the possible fog modes, EXP, EXP2 and LINEAR.
|
|
|
|
|
|
This currently just sets the fog colour in the rasterizer.
|
|
Currently just sets the renderer option for what polygon mode we
want the rasterizer to draw in. GLQuake only uses `GL_FRONT_AND_BACK`
with `GL_FILL` )which implies both back and front facing triangles
are to be filled completely by the rasterizer), so keeping this as
a small stub is perfectly fine for now.
|
|
|
|
|
|
|
|
|
|
The Context and Software Rasterizer now gets the array of texture units
instead of a single texture object. _Technically_, we now support some
primitive form of multi-texturing, though I'm not entirely sure how well
it will work in its current state.
|
|
Textures are now initialized with a nullptr upon generation.
They are only actually created once they are bound to a target.
Currently only the GL_TEXTURE_2D target is supported.
The software rasterizer now allows rendering with or without
a bound TEXTURE_2D.
|
|
|
|
|
|
The software rasterizer now samples a texture passed to us from the
GL context. This is currently a bit of a hack, as we should be
scanning from a list of texture units and checking if they are
enabled. For now, this at least gives some visual confirmation
that texturing is working as it should
|
|
|
|
This implements glAlphaFunc() for setting alpha test func and ref value
and also allows enabling and disabling GL_ALPHA_TEST
|
|
|
|
Tests against and writes to the depth buffer when GL_DEPTH_TEST is
enabled via glEnable(). Currently fragment z is always compared against
existing depth with GL_LESS.
|
|
This adds glClearDepth() and new caps for enabling and disabling
the depth buffer with glEnable() and glDisable()
|
|
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.
|