material.h 557 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include "atto/math.h"
  3. struct ICollection;
  4. struct Texture;
  5. struct Stack;
  6. typedef enum {
  7. MShader_Unknown,
  8. MShader_LightmappedOnly,
  9. MShader_LightmappedGeneric,
  10. MShader_UnlitGeneric,
  11. MShader_COUNT
  12. } MShader;
  13. typedef struct {
  14. const struct Texture *texture;
  15. struct {
  16. AVec2f translate;
  17. AVec2f scale;
  18. } transform;
  19. } MTexture;
  20. typedef struct Material {
  21. MShader shader;
  22. struct AVec3f average_color;
  23. MTexture base_texture;
  24. } Material;
  25. const Material *materialGet(const char *name, struct ICollection *collection, struct Stack *tmp);