summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL/SoftwareRasterizer.h
AgeCommit message (Collapse)Author
2021-09-02LibGL: Implement glPolygonOffsetStephan Unverwerth
2021-09-02LibGL: Implement glDrawBufferStephan Unverwerth
2021-08-25LibGL: Implement fog effect in Software RasterizerJesse Buhagiar
We support three of the possible fog modes, EXP, EXP2 and LINEAR.
2021-08-25LibGL: Implement `glFogi`Jesse Buhagiar
2021-08-25LibGL: Implement `glFogf`Jesse Buhagiar
2021-08-25LibGL: Implement `glFogfv`Jesse Buhagiar
This currently just sets the fog colour in the rasterizer.
2021-08-20LibGL: Implement `glPolygonMode`Jesse Buhagiar
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.
2021-08-18LibGL: Implement glDepthFuncStephan Unverwerth
2021-08-18LibGL: Implement glDepthRangeStephan Unverwerth
2021-08-15LibGL: Implement `glColorMask`Jesse Buhagiar
2021-08-14LibGL: Implement glDepthMaskStephan Unverwerth
2021-05-31LibGL: Use Texture Units in Rasterizer and ContextJesse Buhagiar
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.
2021-05-30LibGL: Implement glBindTexture()Stephan Unverwerth
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.
2021-05-30LibGL: Introduce Texture base class for all texture typesStephan Unverwerth
2021-05-29Everywhere: Use s.unverwerth@serenityos.org :^)Stephan Unverwerth
2021-05-26LibGL: Add texture sampling to SW RasterizerJesse Buhagiar
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
2021-05-24LibGL: Implement glReadPixels()Stephan Unverwerth
2021-05-16LibGL: Implement glAlphaFunc()Stephan Unverwerth
This implements glAlphaFunc() for setting alpha test func and ref value and also allows enabling and disabling GL_ALPHA_TEST
2021-05-16LibGL: Add support for GL_BLEND in glEnable() and glDisable()Stephan Unverwerth
2021-05-09LibGL: Add depth tests and writes to SoftwareRasterizerStephan Unverwerth
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.
2021-05-09LibGL: Add supporting code for depth bufferStephan Unverwerth
This adds glClearDepth() and new caps for enabling and disabling the depth buffer with glEnable() and glDisable()
2021-05-08LibGL: Add software rasterizerStephan Unverwerth
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.