mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:37:45 +00:00
LibGL+LibSoftGPU: Add method to query device info
This adds a method `info()` to SoftGPU that returns the name of the hardware vendor and device name, as well as the number of texture untis. LibGL uses the returned texture unit count to initialize its internal texture unit array.
This commit is contained in:
parent
1a758d7bf2
commit
39995548e4
5 changed files with 40 additions and 7 deletions
|
@ -15,6 +15,7 @@
|
|||
#include <LibGfx/Vector4.h>
|
||||
#include <LibSoftGPU/Clipper.h>
|
||||
#include <LibSoftGPU/DepthBuffer.h>
|
||||
#include <LibSoftGPU/DeviceInfo.h>
|
||||
#include <LibSoftGPU/Enums.h>
|
||||
#include <LibSoftGPU/Image.h>
|
||||
#include <LibSoftGPU/ImageFormat.h>
|
||||
|
@ -62,6 +63,8 @@ class Device final {
|
|||
public:
|
||||
Device(const Gfx::IntSize& min_size);
|
||||
|
||||
DeviceInfo info() const;
|
||||
|
||||
void draw_primitives(PrimitiveType, FloatMatrix4x4 const& transform, FloatMatrix4x4 const& texture_matrix, Vector<Vertex> const& vertices, Vector<size_t> const& enabled_texture_units);
|
||||
void resize(const Gfx::IntSize& min_size);
|
||||
void clear_color(const FloatVector4&);
|
||||
|
@ -89,7 +92,7 @@ private:
|
|||
Vector<Triangle> m_triangle_list;
|
||||
Vector<Triangle> m_processed_triangles;
|
||||
Vector<Vertex> m_clipped_vertices;
|
||||
Sampler m_samplers[num_samplers];
|
||||
Array<Sampler, num_samplers> m_samplers;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue