Minor Update - V.9.2.0
[FEAT] : - Add More Object Property to the save and load
This commit is contained in:
parent
3930c5eff7
commit
606aaa76e9
@ -5,13 +5,12 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e81d6e08-efc7-40a0-909d-ec4943d948e9" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.KhaoticEngineReborn/.idea/projectSettingsUpdater.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.KhaoticEngineReborn/.idea/projectSettingsUpdater.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/enginecustom/assets/scene.ker" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/assets/scene.ker" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/inc/system/applicationclass.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/applicationclass.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/Systemclass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/Systemclass.cpp" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/enginecustom/imgui.ini" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/imgui.ini" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/inc/system/object.h" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/inc/system/object.h" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/applicationclass.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/applicationclass.cpp" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/imguiManager.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/imguiManager.cpp" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/enginecustom/src/src/system/object.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/enginecustom/src/src/system/object.cpp" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@ -157,7 +156,7 @@
|
||||
<workItem from="1742314944369" duration="79000" />
|
||||
<workItem from="1742318452773" duration="2258000" />
|
||||
<workItem from="1742331065936" duration="3030000" />
|
||||
<workItem from="1742371397157" duration="5389000" />
|
||||
<workItem from="1742371397157" duration="8862000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="Minor update - viewport window tweak">
|
||||
<option name="closed" value="true" />
|
||||
|
@ -75,15 +75,15 @@ DockId=0x00000006,0
|
||||
DockSpace ID=0xC0DFADC4 Pos=8,27 Size=1568,826 Split=X
|
||||
DockNode ID=0x00000001 Parent=0xC0DFADC4 SizeRef=330,1094 Selected=0x393905AB
|
||||
DockNode ID=0x00000003 Parent=0xC0DFADC4 SizeRef=1700,1094 CentralNode=1
|
||||
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=8,27 Size=1568,826 Split=X
|
||||
DockNode ID=0x00000009 Parent=0xCCBD8CF7 SizeRef=289,974 Selected=0x031DC75C
|
||||
DockNode ID=0x0000000D Parent=0xCCBD8CF7 SizeRef=1613,974 Split=X
|
||||
DockNode ID=0x00000002 Parent=0x0000000D SizeRef=1268,826 Split=Y
|
||||
DockNode ID=0x00000004 Parent=0x00000002 SizeRef=2032,866 Split=Y
|
||||
DockNode ID=0x0000000B Parent=0x00000004 SizeRef=1568,637 Split=X
|
||||
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=8,27 Size=1568,826 Split=Y
|
||||
DockNode ID=0x00000004 Parent=0xCCBD8CF7 SizeRef=1568,598 Split=X
|
||||
DockNode ID=0x00000009 Parent=0x00000004 SizeRef=289,974 Selected=0x031DC75C
|
||||
DockNode ID=0x0000000D Parent=0x00000004 SizeRef=1613,974 Split=X
|
||||
DockNode ID=0x00000002 Parent=0x0000000D SizeRef=1268,826 Split=Y
|
||||
DockNode ID=0x0000000B Parent=0x00000002 SizeRef=1568,637 Split=X
|
||||
DockNode ID=0x00000007 Parent=0x0000000B SizeRef=250,826 Selected=0x393905AB
|
||||
DockNode ID=0x00000008 Parent=0x0000000B SizeRef=971,826 CentralNode=1 Selected=0x031DC75C
|
||||
DockNode ID=0x0000000C Parent=0x00000004 SizeRef=1568,335 Selected=0x139FDA3F
|
||||
DockNode ID=0x00000006 Parent=0x00000002 SizeRef=2032,226 Selected=0xAB74BEE9
|
||||
DockNode ID=0x00000005 Parent=0x0000000D SizeRef=343,826 Selected=0x9F035453
|
||||
DockNode ID=0x0000000C Parent=0x00000002 SizeRef=1568,335 Selected=0x139FDA3F
|
||||
DockNode ID=0x00000005 Parent=0x0000000D SizeRef=343,826 Selected=0x9F035453
|
||||
DockNode ID=0x00000006 Parent=0xCCBD8CF7 SizeRef=1568,226 Selected=0xAB74BEE9
|
||||
|
||||
|
@ -10,6 +10,20 @@ enum class ObjectType
|
||||
Unknown
|
||||
};
|
||||
|
||||
enum class ShaderType
|
||||
{
|
||||
CEL_SHADING,
|
||||
LIGHTING,
|
||||
NORMAL_MAPPING,
|
||||
SPECULAR_MAPPING,
|
||||
REFLECTION,
|
||||
REFRACTION,
|
||||
TEXTURE,
|
||||
SKYBOX,
|
||||
SUNLIGHT,
|
||||
ALPHA_MAPPING
|
||||
};
|
||||
|
||||
class Object : public ModelClass
|
||||
{
|
||||
public:
|
||||
@ -63,32 +77,24 @@ public:
|
||||
void SetName(std::string name);
|
||||
int SetId(int id);
|
||||
int GetId() const;
|
||||
void SetType(ObjectType type) { m_type = type; };
|
||||
void SetType(ObjectType type);
|
||||
ObjectType GetType() const { return m_type; };
|
||||
|
||||
|
||||
enum ShaderType
|
||||
{
|
||||
CEL_SHADING,
|
||||
LIGHTING,
|
||||
NORMAL_MAPPING,
|
||||
SPECULAR_MAPPING,
|
||||
REFLECTION,
|
||||
REFRACTION,
|
||||
TEXTURE,
|
||||
SKYBOX,
|
||||
SUNLIGHT,
|
||||
ALPHA_MAPPING
|
||||
};
|
||||
|
||||
ShaderType GetActiveShader() const { return m_activeShader; };
|
||||
void SetActiveShader(ShaderType activeShader) { m_activeShader = activeShader; };
|
||||
|
||||
float GetBoundingRadius() const;
|
||||
void SetBoundingRadius(float radius) { m_boundingRadius = radius; }
|
||||
|
||||
void SetModelPath(std::wstring& path) { m_modelPath = path; }
|
||||
std::wstring& GetModelPath() { return m_modelPath; }
|
||||
|
||||
ShaderType StringToShaderType(const std::string& shaderType);
|
||||
std::string ShaderTypeToString(ShaderType shaderType);
|
||||
|
||||
ObjectType StringToObjectType(const std::string& objectType);
|
||||
std::string ObjectTypeToString(ObjectType objectType);
|
||||
|
||||
public :
|
||||
bool m_demoSpinning = false;
|
||||
XMVECTOR m_previousPosition;
|
||||
@ -109,8 +115,9 @@ private:
|
||||
|
||||
std::string m_name;
|
||||
ObjectType m_type = ObjectType::Unknown;
|
||||
|
||||
|
||||
ShaderType m_activeShader = LIGHTING;
|
||||
ShaderType m_activeShader = ShaderType::LIGHTING;
|
||||
|
||||
float m_boundingRadius;
|
||||
std::wstring m_modelPath;
|
||||
|
@ -1421,7 +1421,7 @@ void ApplicationClass::GenerateTerrain()
|
||||
newTerrain->SetTranslateMatrix(XMMatrixTranslation(i / 2 * scaleX , -12.0f, j * scaleZ));
|
||||
newTerrain->SetName(filenameWithoutExtension);
|
||||
newTerrain->SetType(ObjectType::Cube);
|
||||
newTerrain->SetActiveShader(Object::SUNLIGHT);
|
||||
newTerrain->SetActiveShader(ShaderType::SUNLIGHT);
|
||||
m_terrainChunk.push_back(newTerrain);
|
||||
|
||||
}
|
||||
@ -1843,7 +1843,7 @@ bool ApplicationClass::RenderPass(const std::vector<std::reference_wrapper<std::
|
||||
switch (object->GetActiveShader())
|
||||
{
|
||||
|
||||
case Object::ALPHA_MAPPING:
|
||||
case ShaderType::ALPHA_MAPPING:
|
||||
|
||||
// Enable alpha blending for transparency.
|
||||
m_Direct3D->EnableAlphaBlending();
|
||||
@ -1867,7 +1867,7 @@ bool ApplicationClass::RenderPass(const std::vector<std::reference_wrapper<std::
|
||||
m_Direct3D->DisableAlphaBlending();
|
||||
break;
|
||||
|
||||
case Object::CEL_SHADING:
|
||||
case ShaderType::CEL_SHADING:
|
||||
result = m_ShaderManager->RenderCelShadingShader(
|
||||
m_Direct3D->GetDeviceContext(),
|
||||
object->GetIndexCount(),
|
||||
@ -1887,7 +1887,7 @@ bool ApplicationClass::RenderPass(const std::vector<std::reference_wrapper<std::
|
||||
}
|
||||
break;
|
||||
|
||||
case Object::NORMAL_MAPPING:
|
||||
case ShaderType::NORMAL_MAPPING:
|
||||
result = m_ShaderManager->RenderNormalMapShader(
|
||||
m_Direct3D->GetDeviceContext(),
|
||||
object->GetIndexCount(),
|
||||
@ -1906,7 +1906,7 @@ bool ApplicationClass::RenderPass(const std::vector<std::reference_wrapper<std::
|
||||
}
|
||||
break;
|
||||
|
||||
case Object::SPECULAR_MAPPING:
|
||||
case ShaderType::SPECULAR_MAPPING:
|
||||
result = m_ShaderManager->RenderSpecMapShader(
|
||||
m_Direct3D->GetDeviceContext(),
|
||||
object->GetIndexCount(),
|
||||
@ -1928,7 +1928,7 @@ bool ApplicationClass::RenderPass(const std::vector<std::reference_wrapper<std::
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case Object::TEXTURE:
|
||||
case ShaderType::TEXTURE:
|
||||
result = m_ShaderManager->RenderTextureShader(
|
||||
m_Direct3D->GetDeviceContext(),
|
||||
object->GetIndexCount(),
|
||||
@ -1944,7 +1944,7 @@ bool ApplicationClass::RenderPass(const std::vector<std::reference_wrapper<std::
|
||||
}
|
||||
break;
|
||||
|
||||
case Object::LIGHTING:
|
||||
case ShaderType::LIGHTING:
|
||||
result = m_ShaderManager->RenderlightShader(
|
||||
m_Direct3D->GetDeviceContext(),
|
||||
object->GetIndexCount(),
|
||||
@ -1963,7 +1963,7 @@ bool ApplicationClass::RenderPass(const std::vector<std::reference_wrapper<std::
|
||||
}
|
||||
break;
|
||||
|
||||
case Object::SUNLIGHT:
|
||||
case ShaderType::SUNLIGHT:
|
||||
result = m_ShaderManager->RenderSunlightShader(
|
||||
m_Direct3D->GetDeviceContext(),
|
||||
object->GetIndexCount(),
|
||||
@ -2065,7 +2065,7 @@ void ApplicationClass::ConstructSkybox() {
|
||||
face->SetScaleMatrix(XMMatrixScaling(2.01f, 2.01f, 2.01f));
|
||||
face->SetRotateMatrix(rotations[i]);
|
||||
face->SetTranslateMatrix(translations[i]);
|
||||
face->SetActiveShader(Object::SKYBOX);
|
||||
face->SetActiveShader(ShaderType::SKYBOX);
|
||||
m_Skybox.push_back(face);
|
||||
m_SkyboxInitialTranslations.push_back(translations[i]);
|
||||
}
|
||||
@ -2238,82 +2238,96 @@ std::string ApplicationClass::ConvertWStringToString(const std::wstring& wstr)
|
||||
return str;
|
||||
}
|
||||
|
||||
void ApplicationClass::SaveScene()
|
||||
{
|
||||
if (m_scenePath.empty())
|
||||
{
|
||||
Logger::Get().Log("Scene path is empty. Cannot save scene.", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||
return;
|
||||
}
|
||||
void ApplicationClass::SaveScene() {
|
||||
if (m_scenePath.empty()) {
|
||||
Logger::Get().Log("Scene path is empty. Cannot save scene.", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||
return;
|
||||
}
|
||||
|
||||
std::ofstream outFile(m_scenePath);
|
||||
if (!outFile.is_open())
|
||||
{
|
||||
Logger::Get().Log("Failed to open file for saving scene", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||
return;
|
||||
}
|
||||
std::ofstream outFile(m_scenePath);
|
||||
if (!outFile.is_open()) {
|
||||
Logger::Get().Log("Failed to open file for saving scene", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||
return;
|
||||
}
|
||||
|
||||
for (const auto& object : m_object)
|
||||
{
|
||||
XMFLOAT3 position, scale;
|
||||
XMStoreFloat3(&position, object->GetPosition());
|
||||
XMStoreFloat3(&scale, object->GetScale());
|
||||
outFile << object->GetId() << " " << object->GetName() << " "
|
||||
<< position.x << " " << position.y << " " << position.z << " "
|
||||
<< scale.x << " " << scale.y << " " << scale.z << " "
|
||||
<< ConvertWStringToString(object->GetModelPath()) << std::endl; // Convert model path to std::string
|
||||
}
|
||||
for (const auto& object : m_object) {
|
||||
XMFLOAT3 position, scale, rotation;
|
||||
XMStoreFloat3(&position, object->GetPosition());
|
||||
XMStoreFloat3(&scale, object->GetScale());
|
||||
XMStoreFloat3(&rotation, object->GetRotation());
|
||||
|
||||
outFile.close();
|
||||
Logger::Get().Log("Scene saved successfully", __FILE__, __LINE__, Logger::LogLevel::Info);
|
||||
outFile << object->GetId() << " "
|
||||
<< object->GetName() << " "
|
||||
<< position.x << " " << position.y << " " << position.z << " "
|
||||
<< rotation.x << " " << rotation.y << " " << rotation.z << " "
|
||||
<< scale.x << " " << scale.y << " " << scale.z << " "
|
||||
<< ConvertWStringToString(object->GetModelPath()) << " "
|
||||
<< object->ShaderTypeToString(object->GetActiveShader()) << " "
|
||||
<< object->GetBoundingRadius() << " "
|
||||
<< object->ObjectTypeToString(object->GetType()) << " "
|
||||
<< object->GetMass() << " "
|
||||
<< object->IsPhysicsEnabled() << std::endl;
|
||||
}
|
||||
|
||||
outFile.close();
|
||||
Logger::Get().Log("Scene saved successfully", __FILE__, __LINE__, Logger::LogLevel::Info);
|
||||
}
|
||||
|
||||
void ApplicationClass::LoadScene()
|
||||
{
|
||||
void ApplicationClass::LoadScene() {
|
||||
|
||||
std::wstring scenePath = GetScenePath();
|
||||
if (!scenePath.empty())
|
||||
{
|
||||
SetScenePath(ConvertWStringToString(scenePath));
|
||||
}
|
||||
|
||||
if (m_scenePath.empty())
|
||||
{
|
||||
Logger::Get().Log("Scene path is empty. Cannot load scene.", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||
return;
|
||||
}
|
||||
if (m_scenePath.empty()) {
|
||||
Logger::Get().Log("Scene path is empty. Cannot load scene.", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||
return;
|
||||
}
|
||||
|
||||
std::ifstream inFile(m_scenePath);
|
||||
if (!inFile.is_open())
|
||||
{
|
||||
Logger::Get().Log("Failed to open file for loading scene", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||
return;
|
||||
}
|
||||
std::ifstream inFile(m_scenePath);
|
||||
if (!inFile.is_open()) {
|
||||
Logger::Get().Log("Failed to open file for loading scene", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||
return;
|
||||
}
|
||||
|
||||
m_object.clear();
|
||||
m_object.clear();
|
||||
|
||||
int id;
|
||||
std::string name;
|
||||
float posX, posY, posZ;
|
||||
float scaleX, scaleY, scaleZ;
|
||||
std::string modelPath;
|
||||
int id;
|
||||
std::string name;
|
||||
float posX, posY, posZ;
|
||||
float rotX, rotY, rotZ;
|
||||
float scaleX, scaleY, scaleZ;
|
||||
std::string modelPath;
|
||||
std::string shaderTypeStr;
|
||||
float boundingRadius;
|
||||
std::string objectTypeStr;
|
||||
float mass;
|
||||
bool physicsEnabled;
|
||||
|
||||
while (inFile >> id >> name >> posX >> posY >> posZ >> scaleX >> scaleY >> scaleZ >> modelPath)
|
||||
{
|
||||
int size_needed = MultiByteToWideChar(CP_UTF8, 0, modelPath.c_str(), (int)modelPath.size(), NULL, 0);
|
||||
std::wstring wModelPath(size_needed, 0);
|
||||
MultiByteToWideChar(CP_UTF8, 0, modelPath.c_str(), (int)modelPath.size(), &wModelPath[0], size_needed);
|
||||
while (inFile >> id >> name >> posX >> posY >> posZ >> rotX >> rotY >> rotZ >> scaleX >> scaleY >> scaleZ >> modelPath >> shaderTypeStr >> boundingRadius >> objectTypeStr >> mass >> physicsEnabled) {
|
||||
int size_needed = MultiByteToWideChar(CP_UTF8, 0, modelPath.c_str(), (int)modelPath.size(), NULL, 0);
|
||||
std::wstring wModelPath(size_needed, 0);
|
||||
MultiByteToWideChar(CP_UTF8, 0, modelPath.c_str(), (int)modelPath.size(), &wModelPath[0], size_needed);
|
||||
|
||||
AddKobject(wModelPath);
|
||||
AddKobject(wModelPath);
|
||||
|
||||
Object* newObject = m_object.back();
|
||||
newObject->SetId(id);
|
||||
newObject->SetName(name);
|
||||
newObject->SetPosition(XMVectorSet(posX, posY, posZ, 0.0f));
|
||||
newObject->SetScale(XMVectorSet(scaleX, scaleY, scaleZ, 0.0f));
|
||||
}
|
||||
Object* newObject = m_object.back();
|
||||
newObject->SetId(id);
|
||||
newObject->SetName(name);
|
||||
newObject->SetPosition(XMVectorSet(posX, posY, posZ, 0.0f));
|
||||
newObject->SetRotation(XMVectorSet(rotX, rotY, rotZ, 0.0f));
|
||||
newObject->SetScale(XMVectorSet(scaleX, scaleY, scaleZ, 0.0f));
|
||||
newObject->SetActiveShader(newObject->StringToShaderType(shaderTypeStr));
|
||||
newObject->SetBoundingRadius(boundingRadius);
|
||||
newObject->SetType(newObject->StringToObjectType(objectTypeStr));
|
||||
newObject->SetMass(mass);
|
||||
newObject->SetPhysicsEnabled(physicsEnabled);
|
||||
}
|
||||
|
||||
inFile.close();
|
||||
Logger::Get().Log("Scene loaded successfully", __FILE__, __LINE__, Logger::LogLevel::Info);
|
||||
inFile.close();
|
||||
Logger::Get().Log("Scene loaded successfully", __FILE__, __LINE__, Logger::LogLevel::Info);
|
||||
}
|
||||
|
||||
std::wstring ApplicationClass::GetScenePath()
|
||||
|
@ -359,13 +359,13 @@ void imguiManager::WidgetObjectWindow(ApplicationClass* app)
|
||||
"Enable Alpha Mapping"
|
||||
};
|
||||
|
||||
Object::ShaderType shaderTypes[] = {
|
||||
Object::SUNLIGHT,
|
||||
Object::LIGHTING,
|
||||
Object::CEL_SHADING,
|
||||
Object::NORMAL_MAPPING,
|
||||
Object::SPECULAR_MAPPING,
|
||||
Object::ALPHA_MAPPING
|
||||
ShaderType shaderTypes[] = {
|
||||
ShaderType::SUNLIGHT,
|
||||
ShaderType::LIGHTING,
|
||||
ShaderType::CEL_SHADING,
|
||||
ShaderType::NORMAL_MAPPING,
|
||||
ShaderType::SPECULAR_MAPPING,
|
||||
ShaderType::ALPHA_MAPPING
|
||||
};
|
||||
|
||||
// Variable pour stocker l'option sélectionnée
|
||||
|
@ -259,4 +259,51 @@ void Object::UpdatePosition(float deltaTime)
|
||||
XMVECTOR position = GetPosition();
|
||||
position = position + GetVelocity() * deltaTime;
|
||||
SetPosition(position);
|
||||
}
|
||||
|
||||
void Object::SetType(ObjectType type)
|
||||
{
|
||||
m_type = type;
|
||||
}
|
||||
|
||||
std::string Object::ObjectTypeToString(ObjectType type) {
|
||||
switch (type) {
|
||||
case ObjectType::Cube: return "Cube";
|
||||
case ObjectType::Sphere: return "Sphere";
|
||||
// Ajoutez d'autres cas si nécessaire
|
||||
default: return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
ObjectType Object::StringToObjectType(const std::string& str) {
|
||||
if (str == "Cube") return ObjectType::Cube;
|
||||
if (str == "Sphere") return ObjectType::Sphere;
|
||||
// Add other cases as needed
|
||||
return ObjectType::Unknown;
|
||||
}
|
||||
|
||||
std::string Object::ShaderTypeToString(ShaderType type) {
|
||||
switch (type) {
|
||||
case ShaderType::ALPHA_MAPPING: return "ALPHA_MAPPING";
|
||||
case ShaderType::CEL_SHADING: return "CEL_SHADING";
|
||||
case ShaderType::NORMAL_MAPPING: return "NORMAL_MAPPING";
|
||||
case ShaderType::SPECULAR_MAPPING: return "SPECULAR_MAPPING";
|
||||
case ShaderType::TEXTURE: return "TEXTURE";
|
||||
case ShaderType::LIGHTING: return "LIGHTING";
|
||||
case ShaderType::SUNLIGHT: return "SUNLIGHT";
|
||||
// Ajoutez d'autres cas si nécessaire
|
||||
default: return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
ShaderType Object::StringToShaderType(const std::string& str) {
|
||||
if (str == "ALPHA_MAPPING") return ShaderType::ALPHA_MAPPING;
|
||||
if (str == "CEL_SHADING") return ShaderType::CEL_SHADING;
|
||||
if (str == "NORMAL_MAPPING") return ShaderType::NORMAL_MAPPING;
|
||||
if (str == "SPECULAR_MAPPING") return ShaderType::SPECULAR_MAPPING;
|
||||
if (str == "TEXTURE") return ShaderType::TEXTURE;
|
||||
if (str == "LIGHTING") return ShaderType::LIGHTING;
|
||||
if (str == "SUNLIGHT") return ShaderType::SUNLIGHT;
|
||||
// Add other cases as needed
|
||||
return ShaderType::TEXTURE;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user