mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 11:57:36 +00:00
LibGL+LibGPU+LibSoftGPU: Move Vertex.h to LibGPU
This commit is contained in:
parent
5bf224708f
commit
5d2740217f
11 changed files with 37 additions and 34 deletions
|
@ -16,4 +16,8 @@ using ColorType = u32; // BGRA:8888
|
|||
using DepthType = float;
|
||||
using StencilType = u8;
|
||||
|
||||
// FIXME: This constant was originally introduced in LibSoftGPU and is currently used in the Vertex struct.
|
||||
// Once we refactor the interface this should move back into LibSoftGPU.
|
||||
static constexpr int NUM_SAMPLERS = 2;
|
||||
|
||||
}
|
||||
|
|
27
Userland/Libraries/LibGPU/Vertex.h
Normal file
27
Userland/Libraries/LibGPU/Vertex.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Jesse Buhagiar <jooster669@gmail.com>
|
||||
* Copyright (c) 2021, Stephan Unverwerth <s.unverwerth@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Array.h>
|
||||
#include <LibGPU/Config.h>
|
||||
#include <LibGfx/Vector3.h>
|
||||
#include <LibGfx/Vector4.h>
|
||||
|
||||
namespace GPU {
|
||||
|
||||
struct Vertex {
|
||||
FloatVector4 position;
|
||||
FloatVector4 eye_coordinates;
|
||||
FloatVector4 clip_coordinates;
|
||||
FloatVector4 window_coordinates;
|
||||
FloatVector4 color;
|
||||
Array<FloatVector4, GPU::NUM_SAMPLERS> tex_coords;
|
||||
FloatVector3 normal;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue