2022-10-19 18:37:27 +08:00
|
|
|
/******************************************************************************
|
2022-11-11 13:18:28 +08:00
|
|
|
* \file AssetMacros.h
|
2022-10-19 18:37:27 +08:00
|
|
|
* \author Loh Xiao Qi
|
|
|
|
* \brief Macros and typedefs for assets
|
|
|
|
*
|
|
|
|
* \copyright Copyright (c) 2022 Digipen Institute of Technology. Reproduction
|
|
|
|
* or disclosure of this file or its contents without the prior
|
|
|
|
* written consent of Digipen Institute of Technology is prohibited
|
|
|
|
******************************************************************************/
|
2022-11-11 13:18:28 +08:00
|
|
|
#pragma once
|
2022-10-19 18:37:27 +08:00
|
|
|
|
|
|
|
#include <filesystem>
|
|
|
|
|
|
|
|
// Typedefs
|
|
|
|
typedef std::filesystem::path AssetPath;
|
|
|
|
|
2023-02-20 19:56:26 +08:00
|
|
|
enum class BUFFER_TARGET : int
|
|
|
|
{
|
|
|
|
ARRAY_BUFFER = 3496,
|
|
|
|
ELEMENT_ARRAY_BUFFER = 34963
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class ACCESSOR_DATA_TYPE : int
|
|
|
|
{
|
|
|
|
BYTE = 5120,
|
|
|
|
U_BYTE = 5121,
|
|
|
|
SHORT = 5122,
|
|
|
|
U_SHORT = 5123,
|
|
|
|
U_INT = 5125,
|
|
|
|
FLOAT = 5126
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class ACCESSOR_COMPONENT_TYPE : int
|
|
|
|
{
|
|
|
|
SCALAR = 64 + 1,
|
|
|
|
VEC2 = 2,
|
|
|
|
VEC3 = 3,
|
|
|
|
VEC4 = 4,
|
|
|
|
MAT2 = 32 + 2,
|
|
|
|
MAT3 = 32 + 3,
|
|
|
|
MAT4 = 32 + 4,
|
|
|
|
VECTOR = 64 + 4,
|
|
|
|
MATRIX = 64 + 16
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class PRIMITIVE_MODE : int
|
|
|
|
{
|
|
|
|
POINT = 0,
|
|
|
|
LINE = 1,
|
|
|
|
LINE_LOOP = 2,
|
|
|
|
LINE_STRIP = 3,
|
|
|
|
TRIANGLE = 4,
|
|
|
|
TRIANGLE_STRIP = 5,
|
|
|
|
TRIANLE_FAN = 6
|
|
|
|
};
|
|
|
|
|
2022-10-19 18:37:27 +08:00
|
|
|
//Directory
|
|
|
|
#ifdef _PUBLISH
|
2022-10-31 14:16:35 +08:00
|
|
|
constexpr std::string_view ASSET_ROOT{ "Assets" };
|
|
|
|
constexpr std::string_view BUILT_IN_ASSET_ROOT{ "Built_In" };
|
2022-10-19 18:37:27 +08:00
|
|
|
#else
|
2022-10-31 14:16:35 +08:00
|
|
|
constexpr std::string_view ASSET_ROOT{ "../../Assets" };
|
|
|
|
constexpr std::string_view BUILT_IN_ASSET_ROOT{ "../../Built_In" };
|
2022-10-19 18:37:27 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// ASSET EXTENSIONS
|
2022-11-04 14:57:24 +08:00
|
|
|
constexpr std::string_view MODEL_EXTENSION {".shmodel"};
|
2022-10-31 14:16:35 +08:00
|
|
|
|
|
|
|
// EXTERNAL EXTENSIONS
|
|
|
|
constexpr std::string_view FBX_EXTENSION{ ".fbx" };
|
|
|
|
constexpr std::string_view GLTF_EXTENSION{ ".gltf" };
|
2022-10-19 18:37:27 +08:00
|
|
|
|
2023-02-20 19:56:26 +08:00
|
|
|
// ATTRIBUTE NAMES
|
2023-02-22 14:48:19 +08:00
|
|
|
// BASIC NEEDED
|
2023-02-20 19:56:26 +08:00
|
|
|
constexpr std::string_view ATT_POSITION {"POSITION"};
|
|
|
|
constexpr std::string_view ATT_NORMAL { "NORMAL" };
|
|
|
|
constexpr std::string_view ATT_TANGENT { "TANGENT" };
|
|
|
|
constexpr std::string_view ATT_TEXCOORD { "TEXCOORD_0" };
|
2023-02-22 14:48:19 +08:00
|
|
|
|
|
|
|
// VARIABLE ATTRIBUTES
|
2023-02-20 19:56:26 +08:00
|
|
|
constexpr std::string_view ATT_WEIGHTS { "WEIGHTS_0" };
|
2023-02-22 14:48:19 +08:00
|
|
|
constexpr std::string_view ATT_JOINT{ "JOINTS_0" };
|
|
|
|
constexpr std::string_view ATT_COLOUR{ "COLOR_0" };
|
2023-02-20 19:56:26 +08:00
|
|
|
|
2022-10-31 14:16:35 +08:00
|
|
|
constexpr std::string_view EXTERNALS[] = {
|
2022-10-19 18:37:27 +08:00
|
|
|
FBX_EXTENSION,
|
|
|
|
GLTF_EXTENSION
|
|
|
|
};
|