GraphicsDefs.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright (c) 2008-2023 the Urho3D project
  2. // License: MIT
  3. #include "../Precompiled.h"
  4. #include "GraphicsDefs.h"
  5. #include "../DebugNew.h"
  6. namespace Urho3D
  7. {
  8. const VertexElement LEGACY_VERTEXELEMENTS[] =
  9. {
  10. VertexElement(TYPE_VECTOR3, SEM_POSITION, 0, false), // Position
  11. VertexElement(TYPE_VECTOR3, SEM_NORMAL, 0, false), // Normal
  12. VertexElement(TYPE_UBYTE4_NORM, SEM_COLOR, 0, false), // Color
  13. VertexElement(TYPE_VECTOR2, SEM_TEXCOORD, 0, false), // Texcoord1
  14. VertexElement(TYPE_VECTOR2, SEM_TEXCOORD, 1, false), // Texcoord2
  15. VertexElement(TYPE_VECTOR3, SEM_TEXCOORD, 0, false), // Cubetexcoord1
  16. VertexElement(TYPE_VECTOR3, SEM_TEXCOORD, 1, false), // Cubetexcoord2
  17. VertexElement(TYPE_VECTOR4, SEM_TANGENT, 0, false), // Tangent
  18. VertexElement(TYPE_VECTOR4, SEM_BLENDWEIGHTS, 0, false), // Blendweights
  19. VertexElement(TYPE_UBYTE4, SEM_BLENDINDICES, 0, false), // Blendindices
  20. VertexElement(TYPE_VECTOR4, SEM_TEXCOORD, 4, true), // Instancematrix1
  21. VertexElement(TYPE_VECTOR4, SEM_TEXCOORD, 5, true), // Instancematrix2
  22. VertexElement(TYPE_VECTOR4, SEM_TEXCOORD, 6, true), // Instancematrix3
  23. VertexElement(TYPE_INT, SEM_OBJECTINDEX, 0, false) // Objectindex
  24. };
  25. const i32 ELEMENT_TYPESIZES[] =
  26. {
  27. sizeof(int),
  28. sizeof(float),
  29. 2 * sizeof(float),
  30. 3 * sizeof(float),
  31. 4 * sizeof(float),
  32. sizeof(unsigned),
  33. sizeof(unsigned)
  34. };
  35. } // namespace Urho3D