summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGPU/TextureUnitConfiguration.h
blob: 686dba5e5df990f4edf980dea95a585ace953af5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * Copyright (c) 2022, Jelle Raaijmakers <jelle@gmta.nl>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <LibGPU/Enums.h>
#include <LibGfx/Matrix4x4.h>
#include <LibGfx/Vector4.h>

namespace GPU {

typedef u8 TextureUnitIndex;

struct TexCoordGeneration {
    bool enabled;
    TexCoordGenerationMode mode;
    FloatVector4 coefficients;
};

struct TextureUnitConfiguration {
    bool enabled { false };
    FloatMatrix4x4 transformation_matrix { FloatMatrix4x4::identity() };
    u8 tex_coord_generation_enabled;
    TexCoordGeneration tex_coord_generation[4];
};

}