1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:37:35 +00:00

LibGL: Use Texture Units in Rasterizer and Context

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.
This commit is contained in:
Jesse Buhagiar 2021-05-30 21:39:31 +10:00 committed by Linus Groh
parent 573c1c82f7
commit 8298e406a4
5 changed files with 38 additions and 27 deletions

View file

@ -10,6 +10,8 @@
#include "GL/gl.h"
#include "GLStruct.h"
#include "Tex/Texture2D.h"
#include "Tex/TextureUnit.h"
#include <AK/Array.h>
#include <AK/OwnPtr.h>
#include <LibGfx/Bitmap.h>
#include <LibGfx/Vector4.h>
@ -31,7 +33,7 @@ class SoftwareRasterizer final {
public:
SoftwareRasterizer(const Gfx::IntSize& min_size);
void submit_triangle(const GLTriangle& triangle, const Texture2D& texture);
void submit_triangle(const GLTriangle& triangle, const Array<TextureUnit, 32>& texture_units);
void submit_triangle(const GLTriangle& triangle);
void resize(const Gfx::IntSize& min_size);
void clear_color(const FloatVector4&);