Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ================================== //
  2. //
  3. // Purpose: Defines a texture compositor infterface which uses simple operations and shaders to
  4. // create complex procedural textures.
  5. //
  6. //============================================================================================== //
  7. #ifndef ITEXTURECOMPOSITOR_H
  8. #define ITEXTURECOMPOSITOR_H
  9. #pragma once
  10. #include "interface.h"
  11. #include "itexture.h"
  12. #define ITEXTURE_COMPOSITOR_INTERFACE_VERSION "_ITextureCompositor000"
  13. enum ECompositeResolveStatus
  14. {
  15. ECRS_Idle,
  16. ECRS_Scheduled,
  17. ECRS_PendingTextureLoads,
  18. ECRS_PendingComposites,
  19. ECRS_Error,
  20. ECRS_Complete
  21. };
  22. enum TextureCompositeCreateFlags_t
  23. {
  24. TEX_COMPOSITE_CREATE_FLAGS_FORCE = 0x00000001,
  25. TEX_COMPOSITE_CREATE_FLAGS_NO_COMPRESSION = 0x00000002,
  26. TEX_COMPOSITE_CREATE_FLAGS_NO_MIPMAPS = 0x00000004,
  27. TEX_COMPOSITE_CREATE_FLAGS_VERIFY_SCHEMA_ONLY = 0x00000008,
  28. TEX_COMPOSITE_CREATE_FLAGS_VERIFY_TEMPLATE_ONLY = 0x00000010,
  29. TEX_COMPOSITE_CREATE_FLAGS_LOG_NODES_ONLY = 0x00000020
  30. };
  31. abstract_class ITextureCompositor
  32. {
  33. public:
  34. virtual int AddRef() = 0;
  35. virtual int Release() = 0;
  36. virtual int GetRefCount() const = 0;
  37. virtual void Update() = 0;
  38. virtual ITexture* GetResultTexture() const = 0;
  39. virtual ECompositeResolveStatus GetResolveStatus() const = 0;
  40. virtual void ScheduleResolve() = 0;
  41. protected:
  42. virtual ~ITextureCompositor() {}
  43. };
  44. #endif /* ITEXTURECOMPOSITOR_H */