Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
@@ -150,6 +150,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\DebugCamera.h" />
|
||||
<ClInclude Include="..\Public\DummyRect.h" />
|
||||
<ClInclude Include="..\Public\Dummy_Cube.h" />
|
||||
<ClInclude Include="..\Public\Dummy_Goblin.h" />
|
||||
<ClInclude Include="..\Public\Editor_Define.h" />
|
||||
@@ -167,6 +168,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\DebugCamera.cpp" />
|
||||
<ClCompile Include="..\Private\DummyRect.cpp" />
|
||||
<ClCompile Include="..\Private\Dummy_Cube.cpp" />
|
||||
<ClCompile Include="..\Private\Dummy_Goblin.cpp" />
|
||||
<ClCompile Include="..\Private\Level_Loading.cpp" />
|
||||
|
||||
@@ -58,6 +58,9 @@
|
||||
<Filter Include="02.GameObjects\Effect">
|
||||
<UniqueIdentifier>{a9a30c22-af8f-421a-8901-edfb8146f59d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Dummys\DummyRect">
|
||||
<UniqueIdentifier>{130c848e-6ab6-4b45-b12c-56db07e2c2f4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Dummy_Goblin">
|
||||
<UniqueIdentifier>{0ebb9c08-69b0-49b6-bac3-c827ca13319a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -99,6 +102,9 @@
|
||||
<ClInclude Include="..\Public\DebugCamera.h">
|
||||
<Filter>02.GameObjects\Dummys\DebugCamera</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\DummyRect.h">
|
||||
<Filter>02.GameObjects\Dummys\DummyRect</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Dummy_Goblin.h">
|
||||
<Filter>02.GameObjects\Dummy_Goblin</Filter>
|
||||
</ClInclude>
|
||||
@@ -139,6 +145,9 @@
|
||||
<ClCompile Include="..\Private\pch.cpp">
|
||||
<Filter>99.Define\DEFAULT</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\DummyRect.cpp">
|
||||
<Filter>02.GameObjects\Dummys\DummyRect</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Dummy_Goblin.cpp">
|
||||
<Filter>02.GameObjects\Dummy_Goblin</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
#include "pch.h"
|
||||
#include "DummyRect.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CDummyRect::CDummyRect(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CDummyRect::CDummyRect(const CDummyRect& rhs)
|
||||
:CGameObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
void CDummyRect::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CDummyRect::Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CDummyRect::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible) {
|
||||
_float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]);
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this, *vPos, m_pTransformCom->Get_Radius());
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CDummyRect::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_POSTEX::UI)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummyRect::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))){
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))){
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pTextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummyRect::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Dororong"), reinterpret_cast<CComponent**>(&m_pTextureCom), nullptr))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_POSTEX, (CComponent**)&m_pShaderCom, nullptr))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummyRect::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CDummyRect::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_float3 vScale = { 300.f, 300.f, 1.f };
|
||||
m_pTransformCom->Set_Scale(vScale);
|
||||
|
||||
D3D11_VIEWPORT ViewportDesc{};
|
||||
_uint iNumViewports = { 1 };
|
||||
|
||||
m_pContext->RSGetViewports(&iNumViewports, &ViewportDesc);
|
||||
|
||||
XMStoreFloat4x4(&m_ViewMatrix, XMMatrixIdentity());
|
||||
XMStoreFloat4x4(&m_ProjMatrix, XMMatrixOrthographicLH(ViewportDesc.Width, ViewportDesc.Height, 0.f, 1.f));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CDummyRect* CDummyRect::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CDummyRect* pInstance = new CDummyRect(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CDummyRect");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CDummyRect::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CDummyRect* pInstance = new CDummyRect(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CDummyRect");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CDummyRect::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pTextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CDummyRect::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -73,6 +73,7 @@ HRESULT CLevel_Loading::Render()
|
||||
|
||||
HRESULT CLevel_Loading::Ready_Layer_BackGround(const _wstring& strLayerTag)
|
||||
{
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "Level_Logo.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Level_Loading.h"
|
||||
#include "DummyRect.h"
|
||||
|
||||
|
||||
CLevel_Logo::CLevel_Logo(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
@@ -12,6 +13,9 @@ CLevel_Logo::CLevel_Logo(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, L
|
||||
|
||||
HRESULT CLevel_Logo::Initialize()
|
||||
{
|
||||
if (FAILED(Ready_Layer_UI(LAYER_BACKGROUND))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -61,6 +65,9 @@ HRESULT CLevel_Logo::Ready_Layer_Camera(const _wstring& strLayerTag)
|
||||
|
||||
HRESULT CLevel_Logo::Ready_Layer_UI(const _wstring& strLayerTag)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummyRect>(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "Loader.h"
|
||||
#include "DebugCamera.h"
|
||||
#include "GameInstance.h"
|
||||
#include "DummyRect.h"
|
||||
#include "MainApp.h"
|
||||
#include "Dummy_Goblin.h"
|
||||
#include "Dummy_Cube.h"
|
||||
@@ -95,11 +96,22 @@ void CLoader::Output()
|
||||
|
||||
HRESULT CLoader::Loading_For_Logo()
|
||||
{
|
||||
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
||||
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Dororong"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/DororongDoro.png"), TEXT("Dororong"), 0)))){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_POSTEX,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxPosTex.hlsl"),
|
||||
VTXPOSTEX::Elements, VTXPOSTEX::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_NORTEX,
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_VtxNorTex.hlsl"),
|
||||
@@ -131,12 +143,16 @@ HRESULT CLoader::Loading_For_Logo()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDummyRect>(g_iStaticLevel, CDummyRect::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDebugCamera>(g_iStaticLevel, CDebugCamera::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_strMessage = TEXT("로딩이 완료되었습니다..");
|
||||
m_strMessage = TEXT("로딩이 완료되었습니다..");
|
||||
|
||||
m_isFinished = true;
|
||||
|
||||
@@ -145,9 +161,9 @@ HRESULT CLoader::Loading_For_Logo()
|
||||
|
||||
HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
{
|
||||
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
||||
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
|
||||
m_strMessage = TEXT("모델를(을) 로딩 중 입니다.");
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_GoblinBody_Model"),
|
||||
CModel::Create(m_pDevice, m_pContext, "../Bin/Resources/Models/Goblin/GoblinBody.fbx", MODEL::ANIM, XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity(), 0))))
|
||||
@@ -157,11 +173,11 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
CModel::Create(m_pDevice, m_pContext, "../Bin/Resources/Models/Box/Box.fbx", MODEL::NONANIM, XMMatrixIdentity(), 0))))
|
||||
return E_FAIL;
|
||||
|
||||
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||
m_strMessage = TEXT("셰이더를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("이펙트를(을) 로딩 중 입니다.");
|
||||
m_strMessage = TEXT("이펙트를(을) 로딩 중 입니다.");
|
||||
|
||||
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||
m_strMessage = TEXT("객체원형를(을) 로딩 중 입니다.");
|
||||
|
||||
/* For.Prototype_GameObject_Dummy_Goblin */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDummy_Goblin>(g_iStaticLevel, CDummy_Goblin::Create(m_pDevice, m_pContext))))
|
||||
@@ -171,9 +187,9 @@ HRESULT CLoader::Loading_For_ObjectViewer()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CDummy_Cube>(g_iStaticLevel, CDummy_Cube::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
m_strMessage = TEXT("정보를 불러오는 중입니다.");
|
||||
m_strMessage = TEXT("정보를 불러오는 중입니다.");
|
||||
|
||||
m_strMessage = TEXT("로딩이 완료되었습니다..");
|
||||
m_strMessage = TEXT("로딩이 완료되었습니다..");
|
||||
|
||||
m_isFinished = true;
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CDummyRect final : public CGameObject
|
||||
{
|
||||
private:
|
||||
CDummyRect(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CDummyRect(const CDummyRect& rhs);
|
||||
virtual ~CDummyRect() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pTextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
_float4x4 m_ViewMatrix{};
|
||||
_float4x4 m_ProjMatrix{};
|
||||
|
||||
public:
|
||||
static CDummyRect* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -110,7 +110,7 @@
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>EDITOR_PROJECT;ENGINE_EXPORTS;IMGUI_EXPORTS;$(USERNAME);_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>EDITOR_PROJECT;ENGINE_EXPORTS;IMGUI_EXPORTS;TINYXML2_EXPORT;$(USERNAME);_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>../Public/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
@@ -133,7 +133,7 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>EDITOR_PROJECT;ENGINE_EXPORTS;IMGUI_EXPORTS;$(USERDOMAIN);NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>EDITOR_PROJECT;ENGINE_EXPORTS;IMGUI_EXPORTS;TINYXML2_EXPORT;$(USERDOMAIN);NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>../Public/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
@@ -256,6 +256,9 @@
|
||||
<ClCompile Include="..\Private\Texture.cpp" />
|
||||
<ClCompile Include="..\Private\Timer.cpp" />
|
||||
<ClCompile Include="..\Private\Timer_Manager.cpp" />
|
||||
<ClCompile Include="..\Private\tinyxml2.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Transform.cpp" />
|
||||
<ClCompile Include="..\Private\VIBuffer.cpp" />
|
||||
<ClCompile Include="..\Private\VIBuffer_Cell.cpp" />
|
||||
@@ -452,6 +455,7 @@
|
||||
<ClInclude Include="..\Public\Texture.h" />
|
||||
<ClInclude Include="..\Public\Timer.h" />
|
||||
<ClInclude Include="..\Public\Timer_Manager.h" />
|
||||
<ClInclude Include="..\Public\tinyxml2.h" />
|
||||
<ClInclude Include="..\Public\Transform.h" />
|
||||
<ClInclude Include="..\Public\VIBuffer.h" />
|
||||
<ClInclude Include="..\Public\VIBuffer_Cell.h" />
|
||||
|
||||
@@ -172,6 +172,9 @@
|
||||
<Filter Include="02.Element\02.Component\02.VIBuffer\Terrain">
|
||||
<UniqueIdentifier>{52994263-6339-4d57-97b3-7bb3c6dca479}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="99.Define\TINYXML2">
|
||||
<UniqueIdentifier>{d93660eb-4bf9-43d2-902e-8ecbefd02481}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="99.Define">
|
||||
<UniqueIdentifier>{2cb454c9-e390-4f2e-8cf5-b5c6325543ed}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -363,6 +366,9 @@
|
||||
<ClCompile Include="..\Private\VIBuffer_Cell.cpp">
|
||||
<Filter>02.Element\02.Component\02.VIBuffer\Cell</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\tinyxml2.cpp">
|
||||
<Filter>99.Define\TINYXML2</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Mesh.cpp">
|
||||
<Filter>02.Element\02.Component\06.Model\Mesh</Filter>
|
||||
</ClCompile>
|
||||
@@ -902,6 +908,9 @@
|
||||
<ClInclude Include="..\Public\VIBuffer_Cell.h">
|
||||
<Filter>02.Element\02.Component\02.VIBuffer\Cell</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\tinyxml2.h">
|
||||
<Filter>99.Define\TINYXML2</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Mesh.h">
|
||||
<Filter>02.Element\02.Component\06.Model\Mesh</Filter>
|
||||
</ClInclude>
|
||||
|
||||
@@ -33,11 +33,11 @@ void CRenderer::Refresh_Renderer()
|
||||
XMStoreFloat3(&m_CubeViewFrustum[i], XMVector3TransformCoord(XMVectorSet(m_CubeViewFrustum[i].x, m_CubeViewFrustum[i].y, m_CubeViewFrustum[i].z, 1.f), matProjInv));
|
||||
XMStoreFloat3(&m_CubeViewFrustum[i], XMVector3TransformCoord(XMVectorSet(m_CubeViewFrustum[i].x, m_CubeViewFrustum[i].y, m_CubeViewFrustum[i].z, 1.f), matViewInv));
|
||||
}
|
||||
// 0(1, 3, 4), 6(2, 5, 7) ( 법선벡터 후보 )
|
||||
// 0, 6( 한 점 후보)
|
||||
// 0(1, 3, 4), 6(2, 5, 7) ( 법선벡터 후보 )
|
||||
// 0, 6( 한 점 후보)
|
||||
//_float3 m_CubeNDC[8] = {
|
||||
// 근 좌하 우하 우상 좌상
|
||||
// 원 좌하 우하 우상 좌상
|
||||
// 근 좌하 우하 우상 좌상
|
||||
// 원 좌하 우하 우상 좌상
|
||||
// 0, 1, 2, 3
|
||||
// 4, 5, 6, 7
|
||||
//{ -1.f, -1.f, 0.f }, { 1.f, -1.f, 0.f }, { 1.f, 1.f, 0.f }, { -1.f, 1.f, 0.f },
|
||||
@@ -61,7 +61,7 @@ HRESULT CRenderer::Add_RenderGroup(RENDER eRenderGroup, CGameObject* pRenderObje
|
||||
//if (pRenderObject->isDead()) {
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//// 프러스텀컬링 예외 추가
|
||||
//// 프러스텀컬링 예외 추가
|
||||
//if (RENDER::UI == eRenderGroup || RENDER::PRIORITY == eRenderGroup /* || RENDER::SHADOW == eRenderGroup*/ || RENDER::BLUR == eRenderGroup) {
|
||||
// m_RenderObjects[ENUM_CLASS(eRenderGroup)].push_back(pRenderObject);
|
||||
// SAFE_ADDREF(pRenderObject);
|
||||
@@ -388,7 +388,7 @@ void CRenderer::Render_UI()
|
||||
XMStoreFloat3(&vSrcPos, pSrc->Get_WorldPostion());
|
||||
|
||||
return vDstPos.z > vSrcPos.z;
|
||||
}); // z 소팅
|
||||
}); // z 소팅
|
||||
|
||||
for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::UI)])
|
||||
{
|
||||
@@ -463,7 +463,7 @@ void CRenderer::Render_Debug()
|
||||
return;
|
||||
}
|
||||
|
||||
/* 렌더타겟을 디버그로 직교투영을 통해 그려라. */
|
||||
/* 렌더타겟을 디버그로 직교투영을 통해 그려라. */
|
||||
if (FAILED(m_pGameInstance->Render_RenderTarget_Debug(TEXT("MRT_GameObjects"), m_pShader, m_pVIBuffer))) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ CTexture::CTexture(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
|
||||
CTexture::CTexture(const CTexture& rhs)
|
||||
:CComponent(rhs)
|
||||
, m_pSRVs{ rhs.m_pSRVs }
|
||||
, m_SRVs{ rhs.m_SRVs }
|
||||
{
|
||||
for (auto& iter : m_pSRVs) {
|
||||
for (auto& iter : m_SRVs) {
|
||||
SAFE_ADDREF(iter);
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ CTexture::CTexture(const CTexture& rhs)
|
||||
|
||||
HRESULT CTexture::Bind_ShaderResource(CShader* pShader, const _char* pConstantName, _uint iTextureIndex)
|
||||
{
|
||||
return pShader->Bind_SRV(pConstantName, m_pSRVs[iTextureIndex]);
|
||||
return pShader->Bind_SRV(pConstantName, m_SRVs[iTextureIndex]);
|
||||
}
|
||||
|
||||
HRESULT CTexture::Bind_ShaderResources(CShader* pShader, const _char* pConstantName, _uint iOffset, _uint iCount)
|
||||
@@ -31,12 +31,12 @@ HRESULT CTexture::Bind_ShaderResources(CShader* pShader, const _char* pConstantN
|
||||
|
||||
ID3D11ShaderResourceView* CTexture::Get_SRV(_uint iTextureIndex)
|
||||
{
|
||||
return m_pSRVs[iTextureIndex];
|
||||
return m_SRVs[iTextureIndex];
|
||||
}
|
||||
|
||||
_uint CTexture::Get_Size()
|
||||
{
|
||||
return (_uint)m_pSRVs.size();
|
||||
return (_uint)m_SRVs.size();
|
||||
}
|
||||
|
||||
HRESULT CTexture::Initialize_Prototype(TEXTURE_LOAD_TYPE eType, const _tchar* pTextureFilePath, const _wstring& wstrTextureKey, _uint iNumTextures)
|
||||
@@ -49,7 +49,7 @@ HRESULT CTexture::Initialize_Prototype(TEXTURE_LOAD_TYPE eType, const _tchar* pT
|
||||
if (FAILED(Load_SRV(CMyTools::ToString(pTextureFilePath).c_str(), &pSRV))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pSRVs.push_back(pSRV);
|
||||
m_SRVs.push_back(pSRV);
|
||||
} break;
|
||||
case Engine::TEXTURE_LOAD_TYPE::INCREMENTAL:
|
||||
if (FAILED(ParseTextureIncrementalToSRVs(iNumTextures, pTextureFilePath))) {
|
||||
@@ -92,9 +92,9 @@ HRESULT CTexture::Load_SRV(const _char* szPath, ID3D11ShaderResourceView** ppSRV
|
||||
|
||||
HRESULT hr = {};
|
||||
|
||||
hr = CreateDDSTextureFromFile(m_pDevice, CMyTools::ToWstring(szTextureFilePath).c_str(), nullptr, ppSRV); // 일단 dds로 시도하고
|
||||
hr = CreateDDSTextureFromFile(m_pDevice, CMyTools::ToWstring(szTextureFilePath).c_str(), nullptr, ppSRV); // 일단 dds로 시도하고
|
||||
if (FAILED(hr)) {
|
||||
memset(szTextureFilePath, 0, sizeof(_char) * MAX_PATH); // 실패하면 원래 확장자로 다시 시도
|
||||
memset(szTextureFilePath, 0, sizeof(_char) * MAX_PATH); // 실패하면 원래 확장자로 다시 시도
|
||||
strcat_s(szTextureFilePath, szTextureFileName);
|
||||
strcat_s(szTextureFilePath, szEXT);
|
||||
|
||||
@@ -111,7 +111,7 @@ HRESULT CTexture::Load_SRV(const _char* szPath, ID3D11ShaderResourceView** ppSRV
|
||||
|
||||
HRESULT CTexture::ParseTextureIncrementalToSRVs(_uint iNumTextures, const _tchar* pTextureFilePath)
|
||||
{
|
||||
m_pSRVs.reserve(iNumTextures);
|
||||
m_SRVs.reserve(iNumTextures);
|
||||
|
||||
_tchar szFullPath[MAX_PATH] = {};
|
||||
|
||||
@@ -129,7 +129,7 @@ HRESULT CTexture::ParseTextureIncrementalToSRVs(_uint iNumTextures, const _tchar
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pSRVs.push_back(pSRV);
|
||||
m_SRVs.push_back(pSRV);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
@@ -148,7 +148,7 @@ HRESULT CTexture::ParseTexturePathToSRVs(const _tchar* pTextureFolderPath)
|
||||
files.reserve(128);
|
||||
do {
|
||||
if (fileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
|
||||
continue; // ..폴더 무시
|
||||
continue; // ..폴더 무시
|
||||
}
|
||||
_wstring wstrName = fileData.cFileName;
|
||||
_wstring wstrFull = wstrFolder + L"\\" + wstrName;
|
||||
@@ -163,7 +163,7 @@ HRESULT CTexture::ParseTexturePathToSRVs(const _tchar* pTextureFolderPath)
|
||||
}
|
||||
}
|
||||
|
||||
m_pSRVs.reserve(files.size());
|
||||
m_SRVs.reserve(files.size());
|
||||
ID3D11ShaderResourceView* pSRV = { nullptr };
|
||||
HRESULT hr;
|
||||
for (const auto& filePath : files)
|
||||
@@ -177,7 +177,7 @@ HRESULT CTexture::ParseTexturePathToSRVs(const _tchar* pTextureFolderPath)
|
||||
return hr;
|
||||
}
|
||||
|
||||
m_pSRVs.push_back(pSRV);
|
||||
m_SRVs.push_back(pSRV);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
@@ -212,7 +212,7 @@ CComponent* CTexture::Clone(void* pArg, CGameObject* pOwner)
|
||||
void CTexture::Free()
|
||||
{
|
||||
__super::Free();
|
||||
for (auto& pSRV : m_pSRVs) {
|
||||
for (auto& pSRV : m_SRVs) {
|
||||
SAFE_RELEASE(pSRV);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,6 +5,7 @@
|
||||
#include "VIBuffer_Cell.h"
|
||||
#include "Shader.h"
|
||||
#include "Navigation.h"
|
||||
#include "Texture.h"
|
||||
#include "Cell.h"
|
||||
#include "Model.h"
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class ENGINE_DLL CTexture final :
|
||||
public:
|
||||
HRESULT Bind_ShaderResource(class CShader* pShader, const _char* pConstantName, _uint iTextureIndex);
|
||||
HRESULT Bind_ShaderResources(class CShader* pShader, const _char* pConstantName, _uint iOffset, _uint iCount);
|
||||
vector<ID3D11ShaderResourceView*>* Get_Texture() { return &m_pSRVs; }
|
||||
vector<ID3D11ShaderResourceView*>* Get_Texture() { return &m_SRVs; }
|
||||
ID3D11ShaderResourceView* Get_SRV(_uint iTextureIndex);
|
||||
_uint Get_Size();
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@
|
||||
// FX11
|
||||
#include "FX11/d3dx11effect.h"
|
||||
|
||||
// TinyXML2
|
||||
#include "tinyxml2.h"
|
||||
|
||||
#ifdef EDITOR_PROJECT
|
||||
// assimp
|
||||
#include "assimp/scene.h"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user