mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:57:45 +00:00
LibGL+LibGPU+LibSoftGPU: Implement matrix stack per texture unit
Each texture unit now has its own texture transformation matrix stack. Introduce a new texture unit configuration that is synced when changed. Because we're no longer passing a silly `Vector` when drawing each primitive, this results in a slightly improved frames per second :^)
This commit is contained in:
parent
1540c56e6c
commit
00d46e5d77
22 changed files with 208 additions and 152 deletions
|
@ -21,7 +21,7 @@
|
|||
#include <LibGPU/RasterizerOptions.h>
|
||||
#include <LibGPU/SamplerConfig.h>
|
||||
#include <LibGPU/StencilConfiguration.h>
|
||||
#include <LibGPU/TexCoordGenerationConfig.h>
|
||||
#include <LibGPU/TextureUnitConfiguration.h>
|
||||
#include <LibGPU/Vertex.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibGfx/Matrix3x3.h>
|
||||
|
@ -38,7 +38,7 @@ public:
|
|||
|
||||
virtual DeviceInfo info() const = 0;
|
||||
|
||||
virtual void draw_primitives(PrimitiveType, FloatMatrix4x4 const& model_view_transform, FloatMatrix4x4 const& projection_transform, FloatMatrix4x4 const& texture_transform, Vector<Vertex>& vertices, Vector<size_t> const& enabled_texture_units) = 0;
|
||||
virtual void draw_primitives(PrimitiveType, FloatMatrix4x4 const& model_view_transform, FloatMatrix4x4 const& projection_transform, Vector<Vertex>& vertices) = 0;
|
||||
virtual void resize(Gfx::IntSize const& min_size) = 0;
|
||||
virtual void clear_color(FloatVector4 const&) = 0;
|
||||
virtual void clear_depth(DepthType) = 0;
|
||||
|
@ -61,6 +61,7 @@ public:
|
|||
virtual void set_light_state(unsigned, Light const&) = 0;
|
||||
virtual void set_material_state(Face, Material const&) = 0;
|
||||
virtual void set_stencil_configuration(Face, StencilConfiguration const&) = 0;
|
||||
virtual void set_texture_unit_configuration(TextureUnitIndex, TextureUnitConfiguration const&) = 0;
|
||||
virtual void set_clip_planes(Vector<FloatVector4> const&) = 0;
|
||||
|
||||
virtual RasterPosition raster_position() const = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue