모델오류

This commit is contained in:
hyunbin14
2025-11-07 15:23:16 +09:00
parent aee047bf1e
commit 3c2519643b
88 changed files with 1850 additions and 48 deletions
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 B

@@ -42,7 +42,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v145</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<EnableASAN>true</EnableASAN>
</PropertyGroup>
@@ -150,11 +150,13 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\Public\DebugCamera.h" />
<ClInclude Include="..\Public\Dummy_Goblin.h" />
<ClInclude Include="..\Public\Editor_Define.h" />
<ClInclude Include="..\Public\Editor_Macro.h" />
<ClInclude Include="..\Public\Editor_Struct.h" />
<ClInclude Include="..\Public\Level_Loading.h" />
<ClInclude Include="..\Public\Level_Logo.h" />
<ClInclude Include="..\Public\Level_ObjectViewer.h" />
<ClInclude Include="..\Public\Loader.h" />
<ClInclude Include="..\Public\MainApp.h" />
<ClInclude Include="Editor.h" />
@@ -164,8 +166,10 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\Private\DebugCamera.cpp" />
<ClCompile Include="..\Private\Dummy_Goblin.cpp" />
<ClCompile Include="..\Private\Level_Loading.cpp" />
<ClCompile Include="..\Private\Level_Logo.cpp" />
<ClCompile Include="..\Private\Level_ObjectViewer.cpp" />
<ClCompile Include="..\Private\Loader.cpp" />
<ClCompile Include="..\Private\MainApp.cpp" />
<ClCompile Include="..\Private\pch.cpp">
@@ -58,6 +58,9 @@
<Filter Include="02.GameObjects\Effect">
<UniqueIdentifier>{a9a30c22-af8f-421a-8901-edfb8146f59d}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Dummy_Goblin">
<UniqueIdentifier>{0ebb9c08-69b0-49b6-bac3-c827ca13319a}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Editor.h">
@@ -96,6 +99,12 @@
<ClInclude Include="..\Public\DebugCamera.h">
<Filter>02.GameObjects\Dummys\DebugCamera</Filter>
</ClInclude>
<ClInclude Include="..\Public\Dummy_Goblin.h">
<Filter>02.GameObjects\Dummy_Goblin</Filter>
</ClInclude>
<ClInclude Include="..\Public\Level_ObjectViewer.h">
<Filter>01.Level\20.ObjectViewer</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="Editor.ico">
@@ -127,6 +136,12 @@
<ClCompile Include="..\Private\pch.cpp">
<Filter>99.Define\DEFAULT</Filter>
</ClCompile>
<ClCompile Include="..\Private\Dummy_Goblin.cpp">
<Filter>02.GameObjects\Dummy_Goblin</Filter>
</ClCompile>
<ClCompile Include="..\Private\Level_ObjectViewer.cpp">
<Filter>01.Level\20.ObjectViewer</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Editor.rc">
@@ -0,0 +1,159 @@
#include "pch.h"
#include "Dummy_Goblin.h"
#include "GameInstance.h"
#include "DebugCamera.h"
CDummy_Goblin::CDummy_Goblin(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CGameObject( pDevice, pContext )
{
}
CDummy_Goblin::CDummy_Goblin(const CDummy_Goblin& Prototype)
: CGameObject( Prototype )
{
}
HRESULT CDummy_Goblin::Initialize_Prototype()
{
return S_OK;
}
HRESULT CDummy_Goblin::Initialize(void* pArg)
{
if (FAILED(__super::Initialize(pArg)))
return E_FAIL;
if (FAILED(Ready_Components()))
return E_FAIL;
return S_OK;
}
void CDummy_Goblin::Priority_Update(_float fTimeDelta)
{
}
void CDummy_Goblin::Update(_float fTimeDelta)
{
m_pModelCom->Set_AnimationIndex(0);
m_pModelCom->Play_Animation(fTimeDelta);
}
void CDummy_Goblin::Late_Update(_float fTimeDelta)
{
_float4 vPos;
XMStoreFloat4(&vPos, Get_WorldPostion());
m_pGameInstance->Add_RenderGroup(RENDER::BLEND, this, vPos, 20.f);
}
HRESULT CDummy_Goblin::Render()
{
if (FAILED(Bind_ShaderResources()))
return E_FAIL;
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
for (_uint i = 0; i < iNumMeshes; i++)
{
//if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices")))
// return E_FAIL;
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom, "g_DiffuseTexture", aiTextureType_DIFFUSE, 0)))
return E_FAIL;
if (FAILED(m_pShaderCom->Begin(0)))
return E_FAIL;
if (FAILED(m_pModelCom->Render(i)))
return E_FAIL;
}
return S_OK;
}
HRESULT CDummy_Goblin::Ready_Components()
{
__super::Ready_Components(nullptr);
/* Com_Model */
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(LEVEL::OBJECT), TEXT("Prototype_Component_GoblinBody_Model"),
reinterpret_cast<CComponent**>(&m_pModelCom))))
return E_FAIL;
/* Com_Shader */
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(LEVEL::STATIC), FX_MESH,
reinterpret_cast<CComponent**>(&m_pShaderCom))))
return E_FAIL;
CDebugCamera::CAMERA_DEBUG_DESC CameraDesc{};
CameraDesc.fFovy = XMConvertToRadians(60.0f);
CameraDesc.fNear = 0.1f;
CameraDesc.fFar = 500.f;
CameraDesc.vEye = _float3(0.f, 10.f, -10.f);
CameraDesc.vAt = _float3(0.f, 0.f, 0.f);
CameraDesc.fSpeedPerSec = 5.f;
CameraDesc.fRotationPerSec = XMConvertToRadians(90.0f);
CameraDesc.fMouseSensor = 0.1f;
CameraDesc.pFollowTarget = this;
CameraDesc.pLookTarget = this;
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDebugCamera>(ENUM_CLASS(LEVEL::STATIC), ENUM_CLASS(LEVEL::OBJECT),
TEXT("Layer_Camera"), &CameraDesc)))
return E_FAIL;
return S_OK;
}
HRESULT CDummy_Goblin::Bind_ShaderResources()
{
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
return E_FAIL;
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW))))
return E_FAIL;
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ))))
return E_FAIL;
return S_OK;
}
CDummy_Goblin* CDummy_Goblin::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CDummy_Goblin* pInstance = new CDummy_Goblin(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
MSG_BOX("Failed to Created : CDummy_Goblin");
Safe_Release(pInstance);
}
return pInstance;
}
CGameObject* CDummy_Goblin::Clone(void* pArg, CGameObject* pOwner)
{
CDummy_Goblin* pInstance = new CDummy_Goblin(*this);
if (FAILED(pInstance->Initialize(pArg)))
{
MSG_BOX("Failed to Cloned : CDummy_Goblin");
Safe_Release(pInstance);
}
return pInstance;
}
void CDummy_Goblin::Free()
{
__super::Free();
Safe_Release(m_pShaderCom);
Safe_Release(m_pModelCom);
}
void CDummy_Goblin::Describe_Entity()
{
}
@@ -4,6 +4,7 @@
#include "GameInstance.h"
#include "Level_Logo.h"
#include "Level_ObjectViewer.h"
CLevel_Loading::CLevel_Loading(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
@@ -41,9 +42,9 @@ void CLevel_Loading::Update(_float fTimeDelta)
//case LEVEL::MAP:
// pNewLevel = CLevel_MapViewer::Create(m_pDevice, m_pContext, m_eNextLevelID);
// break;
//case LEVEL::OBJECT:
// pNewLevel = CLevel_ObjectViewer::Create(m_pDevice, m_pContext, m_eNextLevelID);
// break;
case LEVEL::OBJECT:
pNewLevel = CLevel_ObjectViewer::Create(m_pDevice, m_pContext, m_eNextLevelID);
break;
//case LEVEL::COMBINED:
// pNewLevel = CLevel_LevelViewer::Create(m_pDevice, m_pContext, m_eNextLevelID);
// break;
@@ -22,10 +22,10 @@ void CLevel_Logo::Update(_float fTimeDelta)
// if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::MAP))))
// return;
//}
//else if (GUI::Button("Object Editor", { 100, 100 })) {
// if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::OBJECT))))
// return;
//}
/*else */if (GUI::Button("Object Editor", { 100, 100 })) {
if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::OBJECT))))
return;
}
//else if (GUI::Button("Combined Editor", { 100, 100 })) {
// if (FAILED(m_pGameInstance->Change_Level(CLevel_Loading::Create(m_pDevice, m_pContext, LEVEL::LOADING, LEVEL::COMBINED))))
// return;
@@ -0,0 +1,98 @@
#include "pch.h"
#include "Level_ObjectViewer.h"
#include "GameInstance.h"
#include "Level_Loading.h"
#include "Dummy_Goblin.h"
#include "DebugCamera.h"
CLevel_ObjectViewer::CLevel_ObjectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
{
}
HRESULT CLevel_ObjectViewer::Initialize()
{
if (FAILED(Ready_Layer_Camera(TEXT("Layer_Camera"))))
{
return E_FAIL;
}
if (FAILED(Ready_Layer_Dummy(TEXT("Layer_Dummy"))))
{
return E_FAIL;
}
return S_OK;
}
void CLevel_ObjectViewer::Update(_float fTimeDelta)
{
}
HRESULT CLevel_ObjectViewer::Render()
{
SetWindowText(g_hWnd, TEXT("¿ÀºêÁ§Æ® ·¹º§ÀÔ´Ï´Ù"));
GUI::ShowDemoWindow();
return S_OK;
}
HRESULT CLevel_ObjectViewer::Ready_Layer_Camera(const _wstring& strLayerTag)
{
//CDebugCamera::CAMERA_DEBUG_DESC CameraDesc{};
//CameraDesc.fFovy = XMConvertToRadians(60.0f);
//CameraDesc.fNear = 0.1f;
//CameraDesc.fFar = 500.f;
//CameraDesc.vEye = _float3(0.f, 10.f, -10.f);
//CameraDesc.vAt = _float3(0.f, 0.f, 0.f);
//CameraDesc.fSpeedPerSec = 5.f;
//CameraDesc.fRotationPerSec = XMConvertToRadians(90.0f);
//CameraDesc.fMouseSensor = 0.1f;
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDebugCamera>(ENUM_CLASS(LEVEL::STATIC),ENUM_CLASS(LEVEL::OBJECT),
// strLayerTag, &CameraDesc)))
// return E_FAIL;
return S_OK;
}
HRESULT CLevel_ObjectViewer::Ready_Layer_UI(const _wstring& strLayerTag)
{
return S_OK;
}
HRESULT CLevel_ObjectViewer::Ready_Layer_Dummy(const _wstring& strLayerTag)
{
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_Goblin>(ENUM_CLASS(LEVEL::OBJECT), ENUM_CLASS(LEVEL::OBJECT), TEXT("Layer_Dummy"))))
return E_FAIL;
return S_OK;
}
CLevel_ObjectViewer* CLevel_ObjectViewer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
{
CLevel_ObjectViewer* pInstance = new CLevel_ObjectViewer(pDevice, pContext, eLevelID);
if (FAILED(pInstance->Initialize()))
{
MSG_BOX("Failed to Created : CLevel_ObjectViewer");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
void CLevel_ObjectViewer::Free()
{
__super::Free();
}
+34 -3
View File
@@ -3,6 +3,7 @@
#include "DebugCamera.h"
#include "GameInstance.h"
#include "MainApp.h"
#include "Dummy_Goblin.h"
CLoader::CLoader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: m_pDevice{ pDevice }
@@ -58,9 +59,9 @@ HRESULT CLoader::Loading()
//case LEVEL::MAP:
// hr = Loading_For_MapViewer();
// break;
//case LEVEL::OBJECT:
// hr = Loading_For_ObjectViewer();
// break;
case LEVEL::OBJECT:
hr = Loading_For_ObjectViewer();
break;
//case LEVEL::COMBINED:
// hr = Loading_For_CombinedViewer();
// break;
@@ -141,6 +142,36 @@ HRESULT CLoader::Loading_For_Logo()
return S_OK;
}
HRESULT CLoader::Loading_For_ObjectViewer()
{
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
/* For.Prototype_Component_GoblinBody_Model */
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::OBJECT), TEXT("Prototype_Component_GoblinBody_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/Sword/Sword.fbx"))))
return E_FAIL;
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
m_strMessage = TEXT("이펙트를(을) 로딩 중 입니다.");
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
/* For.Prototype_GameObject_Dummy_Goblin */
if (FAILED(m_pGameInstance->Add_Prototype<CDummy_Goblin>(ENUM_CLASS(LEVEL::OBJECT), CDummy_Goblin::Create(m_pDevice, m_pContext))))
return E_FAIL;
m_strMessage = TEXT("정보를 불러오는 중입니다.");
m_strMessage = TEXT("로딩이 완료되었습니다..");
m_isFinished = true;
return S_OK;
}
CLoader* CLoader::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID)
{
CLoader* pInstance = new CLoader(pDevice, pContext);
@@ -0,0 +1,44 @@
#pragma once
#include "Editor_Define.h"
#include "GameObject.h"
NS_BEGIN(Engine)
class CShader;
class CModel;
NS_END
NS_BEGIN(Editor)
class CDummy_Goblin final : public CGameObject
{
private:
CDummy_Goblin(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CDummy_Goblin(const CDummy_Goblin& Prototype);
virtual ~CDummy_Goblin() = default;
public:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
private:
CShader* m_pShaderCom = { nullptr };
CModel* m_pModelCom = { nullptr };
private:
HRESULT Ready_Components();
HRESULT Bind_ShaderResources();
public:
static CDummy_Goblin* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner = nullptr) override;
virtual void Free() override;
virtual void Describe_Entity() override;
};
NS_END
@@ -11,7 +11,7 @@ namespace Editor
const unsigned int g_iWinSizeX = 1920;
const unsigned int g_iWinSizeY = 1080;
enum class LEVEL { STATIC, LOADING, LOGO, LOBY, GAMEPLAY, RESTART, END };
enum class LEVEL { STATIC, LOADING, LOGO, LOBY, GAMEPLAY, RESTART, OBJECT,END };
enum class COLLIDABLEOBJECT { PLAYER, MONSTER, HOSTILE_HITBOX, ALLY_HITBOX, NEUTRAL_HITBOX, ENVIRIONMENT, NPC, ITEM, TRIGGERBOX, REGION, NOCOLLIDE, END };
enum class SHADER_PASS_ANIM { DEFAULT, SHADOW, CAPTURE, BLUR, END };
@@ -0,0 +1,30 @@
#pragma once
#include "Editor_Define.h"
#include "Level.h"
NS_BEGIN(Editor)
class CLevel_ObjectViewer final : public CLevel
{
private:
CLevel_ObjectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID);
virtual ~CLevel_ObjectViewer() = default;
public:
virtual void Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
private:
/* 이 레벨에서 쓰기위한 객체들을 생성한다. */
virtual HRESULT Initialize() override;
HRESULT Ready_Layer_Camera(const _wstring& strLayerTag);
HRESULT Ready_Layer_UI(const _wstring& strLayerTag);
HRESULT Ready_Layer_Dummy(const _wstring& strLayerTag);
public:
static CLevel_ObjectViewer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID);
virtual void Free() override;
};
NS_END
+1
View File
@@ -41,6 +41,7 @@ class CLoader final : public CBase
private:
HRESULT Initialize(LEVEL eNextLevelID);
HRESULT Loading_For_Logo();
HRESULT Loading_For_ObjectViewer();
public:
static CLoader* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eNextLevelID);