LibGL: Add texture sampling to SW Rasterizer

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 commit is contained in:
Jesse Buhagiar 2021-05-23 23:33:33 +10:00 committed by Ali Mohammad Pur
commit 3287709df9
Notes: sideshowbarker 2024-07-18 17:22:03 +09:00
3 changed files with 16 additions and 5 deletions

View file

@ -9,6 +9,7 @@
#include "DepthBuffer.h"
#include "GL/gl.h"
#include "GLStruct.h"
#include "Tex/Texture.h"
#include <AK/OwnPtr.h>
#include <LibGfx/Bitmap.h>
#include <LibGfx/Vector4.h>
@ -30,7 +31,7 @@ class SoftwareRasterizer final {
public:
SoftwareRasterizer(const Gfx::IntSize& min_size);
void submit_triangle(const GLTriangle& triangle);
void submit_triangle(const GLTriangle& triangle, const Texture& texture);
void resize(const Gfx::IntSize& min_size);
void clear_color(const FloatVector4&);
void clear_depth(float);