summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL/CMakeLists.txt
AgeCommit message (Collapse)Author
2022-04-06LibGL+LibGPU+LibSoftGPU: Load SoftGPU driver dynamicallyStephan Unverwerth
This loads libsoftgpu.so during GLContext creation and instantiates the device class which is then passed into the GLContext constructor.
2022-03-09LibGL: Merge GLContext and SoftwareGLContextStephan Unverwerth
This merges GLContext and SoftwareGLContext into a single GLContext class. Since the hardware abstraction is handled via the GPU device interface we do not need the virtual base of GLContext anymore. All context handling functionality from the old GLContext has been moved into the new version. All methods in GLContext are now non virtual and the class is marked as final.
2022-03-08LibGL: Better handling of texture targets and default texturesJelle Raaijmakers
We were lacking support for default textures (i.e. calling `glBindTexture` with a `texture` argument of `0`) which caused our Quake2 port to render red screens whenever a video was playing. Every texture unit is now initialized with a default 2D texture. Additionally, we had this concept of a "currently bound target" on our texture units which is not how OpenGL wants us to handle targets. Calling `glBindTexture` should set the texture for the provided target only, making it sort of an alias for future operations on the same target. Finally, `glDeleteTextures` should not remove the bound texture from the target in the texture unit, but it should reset it to the default texture.
2022-01-20LibGL: Rename `GLMat.cpp` to `GLMatrix.cpp`Jelle Raaijmakers
2021-12-27LibGL: Stub lots of map-related methodsJelle Raaijmakers
This adds stubs for `glMap(1|2)(d|f)`, `glMapGrid(1|2)(d|f)`, `glEvalCoord(1|2)(d|f)`, `glEvalMesh(1|2)` and `glEvalPoint(1|2)`.
2021-12-24LibGL: Remove sampling code from Sampler2DStephan Unverwerth
Texture sampling now happens entirely in SoftGPU thus this class will now only be used to hold the sampler configuration.
2021-12-24LibGL+LibSoftGPU: Move rendering related code to LibSoftGPU libraryStephan Unverwerth
This introduces a new library, LibSoftGPU, that incorporates all rendering related features that formerly resided within LibGL itself. Going forward we will make both libraries completely independent from each other allowing LibGL to load different, possibly accelerated, rendering backends.
2021-12-12LibGL: Implement `glRasterPos2i`Jelle Raaijmakers
2021-12-12LibGL: Implement `glStencil*` functionsJelle Raaijmakers
This implements the context state for stencil testing functions and operations. No rasterization is implemented.
2021-08-25LibGL: Implement `glFogfv`Jesse Buhagiar
This currently just sets the fog colour in the rasterizer.
2021-08-14LibGL: Implement glVertexPointerStephan Unverwerth
2021-08-12LibGL: Turn Sampler2D into an actual classStephan Unverwerth
This extracts the sampler functionality into its own class. Beginning with OpenGL 3 samplers are actual objects, separate from textures. It makes sense to do this already as it also cleans up code organization quite a bit.
2021-05-31LibGL: Implement basic texture unitsJesse Buhagiar
These are merely a way to hold the different texture target bind points that a texture can be bound to.
2021-05-30LibGL: Introduce Texture base class for all texture typesStephan Unverwerth
2021-05-26LibGL: Implement Texture State ManagementJesse Buhagiar
Some very primitive Texture State management. Data can now be uploaded to textures.
2021-05-26LibGL: Add Texture Name AllocationJesse Buhagiar
Texture names can now be allocated via `glGenTextures` and deallocated via `glDeleteTextures`.
2021-05-16LibGL: Implement glShadeModel()Stephan Unverwerth
This turns off interpolation of vertex colors when GL_FLAT is selected.
2021-05-16LibGL: Add defines and stubs for glBlendFunc()Stephan Unverwerth
2021-05-11LibGL: Implement glGenLists and a few friendsAli Mohammad Pur
This commit implements glGenLists(), glNewList(), glDeleteLists(), and glCallList(). The 'compiled' records are implemented as a vector of member function pointers and tuples containing their arguments, and a mechanism is implemented to allow the recorded calls to copy-capture values from the time of the call; this is currently only used with glLoadMatrix.
2021-05-09LibGL: Add depth buffer classStephan Unverwerth
2021-05-08LibGL: Move polygon clipping to `Clipper` classJesse Buhagiar
This code has also been optimised to be much more memory friendly by removing a _lot_ of extraneous copies. The result is that, when profiled, it's around 8x faster than the previous implementation. Co-Authored-By: Ali Mohammad Pur <ali.mpfard@gmail.com>
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.
2021-05-08LibGL: Implement a basic OpenGL 1.x compatible libraryJesse Buhagiar
This currently (obviously) doesn't support any actual 3D hardware, hence all calls are done via software rendering. Note that any modern constructs such as shaders are unsupported, as this driver only implements Fixed Function Pipeline functionality. The library is split into a base GLContext interface and a software based renderer implementation of said interface. The global glXXX functions serve as an OpenGL compatible c-style interface to the currently bound context instance. Co-authored-by: Stephan Unverwerth <s.unverwerth@gmx.de>