lua_DepthStencilTargetFormat.cpp 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. #include "Base.h"
  2. #include "lua_DepthStencilTargetFormat.h"
  3. namespace gameplay
  4. {
  5. static const char* enumStringEmpty = "";
  6. static const char* luaEnumString_DepthStencilTargetFormat_DEPTH = "DEPTH";
  7. static const char* luaEnumString_DepthStencilTargetFormat_DEPTH_STENCIL = "DEPTH_STENCIL";
  8. DepthStencilTarget::Format lua_enumFromString_DepthStencilTargetFormat(const char* s)
  9. {
  10. if (strcmp(s, luaEnumString_DepthStencilTargetFormat_DEPTH) == 0)
  11. return DepthStencilTarget::DEPTH;
  12. if (strcmp(s, luaEnumString_DepthStencilTargetFormat_DEPTH_STENCIL) == 0)
  13. return DepthStencilTarget::DEPTH_STENCIL;
  14. GP_ERROR("Invalid enumeration value '%s' for enumeration DepthStencilTarget::Format.", s);
  15. return DepthStencilTarget::DEPTH;
  16. }
  17. const char* lua_stringFromEnum_DepthStencilTargetFormat(DepthStencilTarget::Format e)
  18. {
  19. if (e == DepthStencilTarget::DEPTH)
  20. return luaEnumString_DepthStencilTargetFormat_DEPTH;
  21. if (e == DepthStencilTarget::DEPTH_STENCIL)
  22. return luaEnumString_DepthStencilTargetFormat_DEPTH_STENCIL;
  23. GP_ERROR("Invalid enumeration value '%d' for enumeration DepthStencilTarget::Format.", e);
  24. return enumStringEmpty;
  25. }
  26. }