TextureUnitConfiguration.h 595 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2022, Jelle Raaijmakers <jelle@gmta.nl>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibGPU/Enums.h>
  8. #include <LibGfx/Matrix4x4.h>
  9. #include <LibGfx/Vector4.h>
  10. namespace GPU {
  11. typedef u8 TextureUnitIndex;
  12. struct TexCoordGeneration {
  13. bool enabled;
  14. TexCoordGenerationMode mode;
  15. FloatVector4 coefficients;
  16. };
  17. struct TextureUnitConfiguration {
  18. bool enabled { false };
  19. FloatMatrix4x4 transformation_matrix { FloatMatrix4x4::identity() };
  20. u8 tex_coord_generation_enabled;
  21. TexCoordGeneration tex_coord_generation[4];
  22. };
  23. }