1113
This commit is contained in:
@@ -345,6 +345,7 @@ void CComputeShader::Free()
|
||||
Safe_Release(m_pOutputUAV[i]);
|
||||
Safe_Release(m_pOutputBuffer[i]);
|
||||
Safe_Release(m_pOutputSRV[i]);
|
||||
Safe_Release(m_pOutputStagingBuffer[i]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "Mesh.h"
|
||||
#include "GameInstance.h"
|
||||
#include "ComputeShader.h"
|
||||
#include "Bone.h"
|
||||
|
||||
CInstance_Model::CInstance_Model(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CComponent{ pDevice , pContext }
|
||||
@@ -427,6 +428,9 @@ void CInstance_Model::Free()
|
||||
for (auto& pMesh : m_Meshes)
|
||||
Safe_Release(pMesh);
|
||||
|
||||
for (auto& pBone : m_Bones)
|
||||
Safe_Release(pBone);
|
||||
|
||||
Safe_Release(m_pComputeShader);
|
||||
Safe_Release(m_pConstantBuffer);
|
||||
Safe_Release(m_pParticleValueBuffer);
|
||||
|
||||
@@ -66,7 +66,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void Asset_Description(_uint iLevel, const _char* pComponentName, CComponent** ppOut, void* pDesc, class CGameObject* pOwner = nullptr, _wstring wstrGroupName = L"")
|
||||
void Asset_Description(_uint iLevel, const _char* pComponentName, Engine::CComponent** ppOut, void* pDesc, class CGameObject* pOwner = nullptr, _wstring wstrGroupName = L"")
|
||||
{
|
||||
return m_pPrototype_Manager->CPrototype_Manager::Asset_Description<T>(iLevel, pComponentName, ppOut, pDesc, pOwner, wstrGroupName);
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent
|
||||
HRESULT Create_SubResource_Buffer();
|
||||
|
||||
private:
|
||||
ID3D11Buffer* m_pVBInstance = { nullptr };
|
||||
ID3D11Buffer* m_pVBInstance = { nullptr };
|
||||
|
||||
INSTANCE_DESC m_InstanceDesc = {};
|
||||
|
||||
@@ -114,9 +114,9 @@ class ENGINE_DLL CInstance_Model final : public CComponent
|
||||
vector<class CBone*> m_Bones = {}; // 나중에 혹시 애님메쉬를 인스턴싱 할 일이 있을지도 모르니 남겨놓음
|
||||
|
||||
private:
|
||||
class CComputeShader* m_pComputeShader = {};
|
||||
ID3D11Buffer* m_pConstantBuffer = { nullptr }; // 컴퓨트 쉐이드 전용 상수버퍼
|
||||
ID3D11Buffer* m_pParticleValueBuffer = { nullptr }; // 컴퓨트 쉐이드 두번째 버퍼 (스피드, 로테이션)
|
||||
class CComputeShader* m_pComputeShader = {};
|
||||
ID3D11Buffer* m_pConstantBuffer = { nullptr }; // 컴퓨트 쉐이드 전용 상수버퍼
|
||||
ID3D11Buffer* m_pParticleValueBuffer = { nullptr }; // 컴퓨트 쉐이드 두번째 버퍼 (스피드, 로테이션)
|
||||
|
||||
public:
|
||||
#ifdef EDITOR_PROJECT
|
||||
|
||||
@@ -71,7 +71,7 @@ class CPrototype_Manager final : public CBase
|
||||
//만들고 선택할 시에 내 ppOut에 클론하는 기능을 담당
|
||||
|
||||
template<typename T>
|
||||
void Asset_Description(_uint iLevel, const _char* pComponentName, CComponent** ppOut, void* pDesc, class CGameObject* pOwner = nullptr, _wstring wstrGroupName = L"")
|
||||
void Asset_Description(_uint iLevel, const _char* pComponentName, Engine::CComponent** ppOut, void* pDesc, class CGameObject* pOwner = nullptr, _wstring wstrGroupName = L"")
|
||||
{
|
||||
vector<const _char*> pComponentNames = {};
|
||||
vector<_string> strNames = {};
|
||||
@@ -131,26 +131,67 @@ class CPrototype_Manager final : public CBase
|
||||
return;
|
||||
}
|
||||
|
||||
static _int s_iCurrentItem = -1;
|
||||
static _int s_iCurrentItem = 0;
|
||||
static ImGuiTextFilter filter;
|
||||
|
||||
// 다른 어셋일 경우 콤보로 띄우기
|
||||
|
||||
if (GUI::Combo(pComponentName, &s_iCurrentItem, pComponentNames.data(), (_int)pComponentNames.size()))
|
||||
if(GUI::BeginCombo(pComponentName, (s_iCurrentItem >= 0 && s_iCurrentItem < pComponentNames.size())
|
||||
? pComponentNames[s_iCurrentItem] : "NONE"))
|
||||
{
|
||||
if (*ppOut != nullptr)
|
||||
Safe_Release(*ppOut);
|
||||
if (ImGui::IsWindowAppearing())
|
||||
{
|
||||
ImGui::SetKeyboardFocusHere();
|
||||
filter.Clear();
|
||||
}
|
||||
|
||||
_string strComponentName = pComponentNames[s_iCurrentItem];
|
||||
_wstring wstrComponentName = CMyTools::ToWstring(strComponentName);
|
||||
|
||||
auto iter = m_pAssets[iLevel].find(wstrComponentName);
|
||||
filter.Draw("##Filter", -FLT_MIN);
|
||||
|
||||
|
||||
for (_uint i = 0; i < pComponentNames.size(); i++)
|
||||
{
|
||||
bool is_selected = (s_iCurrentItem == i);
|
||||
|
||||
if (filter.PassFilter(pComponentNames[i]))
|
||||
{
|
||||
|
||||
if (GUI::Selectable(pComponentNames[i], is_selected))
|
||||
{
|
||||
s_iCurrentItem = i;
|
||||
}
|
||||
|
||||
if (is_selected)
|
||||
{
|
||||
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GUI::EndCombo();
|
||||
}
|
||||
|
||||
if (GUI::Button("Select"))
|
||||
{
|
||||
auto iter = m_pAssets[iLevel].find(CMyTools::ToWstring(pComponentNames[s_iCurrentItem]));
|
||||
|
||||
if (iter == m_pAssets[iLevel].end()) {
|
||||
|
||||
|
||||
GUI::EndCombo();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (*ppOut != nullptr)
|
||||
Safe_Release(*ppOut);
|
||||
|
||||
*ppOut = iter->second->Clone(pDesc, pOwner);
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user