IndexFormat.azsli 612 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #if !defined(IndexFormatEnumType)
  10. #define IndexFormatEnumType
  11. #endif
  12. enum class IndexFormat IndexFormatEnumType
  13. {
  14. Unknown = 0,
  15. Uint16,
  16. Uint32,
  17. };
  18. inline uint GetIndexFormatSize(IndexFormat format)
  19. {
  20. switch (format)
  21. {
  22. case IndexFormat::Uint16:
  23. return 2;
  24. case IndexFormat::Uint32:
  25. return 4;
  26. default:
  27. return 0;
  28. }
  29. }