[fix] 에디터 로고화면 추가
This commit is contained in:
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\Editor_Define.h" />
|
||||
<ClInclude Include="..\Public\Editor_Macro.h" />
|
||||
<ClInclude Include="..\Public\Editor_Struct.h" />
|
||||
@@ -164,6 +165,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\DebugCamera.cpp" />
|
||||
<ClCompile Include="..\Private\DummyRect.cpp" />
|
||||
<ClCompile Include="..\Private\Level_Loading.cpp" />
|
||||
<ClCompile Include="..\Private\Level_Logo.cpp" />
|
||||
<ClCompile Include="..\Private\Loader.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>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Editor.h">
|
||||
@@ -96,6 +99,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>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
@@ -127,6 +133,9 @@
|
||||
<ClCompile Include="..\Private\pch.cpp">
|
||||
<Filter>99.Define\DEFAULT</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\DummyRect.cpp">
|
||||
<Filter>02.GameObjects\Dummys\DummyRect</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
}
|
||||
@@ -72,6 +72,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"
|
||||
|
||||
CLoader::CLoader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -55,24 +56,24 @@ HRESULT CLoader::Loading()
|
||||
case LEVEL::LOGO:
|
||||
hr = Loading_For_Logo();
|
||||
break;
|
||||
//case LEVEL::MAP:
|
||||
// hr = Loading_For_MapViewer();
|
||||
// break;
|
||||
//case LEVEL::OBJECT:
|
||||
// hr = Loading_For_ObjectViewer();
|
||||
// break;
|
||||
//case LEVEL::COMBINED:
|
||||
// hr = Loading_For_CombinedViewer();
|
||||
// break;
|
||||
//case LEVEL::EFFECT:
|
||||
// hr = Loading_For_Effect();
|
||||
// break;
|
||||
//case LEVEL::SKIllSTUDIO:
|
||||
// hr = Loading_For_SkillStudio();
|
||||
// break;
|
||||
//case LEVEL::PARTICLE:
|
||||
// hr = Loading_For_Particle();
|
||||
// break;
|
||||
//case LEVEL::MAP:
|
||||
// hr = Loading_For_MapViewer();
|
||||
// break;
|
||||
//case LEVEL::OBJECT:
|
||||
// hr = Loading_For_ObjectViewer();
|
||||
// break;
|
||||
//case LEVEL::COMBINED:
|
||||
// hr = Loading_For_CombinedViewer();
|
||||
// break;
|
||||
//case LEVEL::EFFECT:
|
||||
// hr = Loading_For_Effect();
|
||||
// break;
|
||||
//case LEVEL::SKIllSTUDIO:
|
||||
// hr = Loading_For_SkillStudio();
|
||||
// break;
|
||||
//case LEVEL::PARTICLE:
|
||||
// hr = Loading_For_Particle();
|
||||
// break;
|
||||
default:
|
||||
assert(false);
|
||||
break;
|
||||
@@ -95,10 +96,21 @@ HRESULT CLoader::Loading_For_Logo()
|
||||
{
|
||||
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("셰이더를(을) 로딩 중 입니다.");
|
||||
|
||||
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"),
|
||||
VTXNORTEX::Elements, VTXNORTEX::iNumElements)))) {
|
||||
@@ -131,6 +143,10 @@ HRESULT CLoader::Loading_For_Logo()
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
@@ -250,6 +250,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" />
|
||||
@@ -439,6 +442,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" />
|
||||
|
||||
@@ -202,6 +202,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>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Base.cpp">
|
||||
@@ -354,6 +357,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>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Base.h">
|
||||
@@ -872,6 +878,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>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Public\Assimp\color4.inl">
|
||||
|
||||
@@ -112,10 +112,10 @@ void CRenderer::Render()
|
||||
Render_NonLight();
|
||||
Render_Blend();
|
||||
Render_UI();
|
||||
|
||||
#ifdef _DEBUG
|
||||
Render_Debug();
|
||||
#endif
|
||||
//
|
||||
//#ifdef _DEBUG
|
||||
// Render_Debug();
|
||||
//#endif
|
||||
}
|
||||
|
||||
void CRenderer::Render_Priority()
|
||||
|
||||
@@ -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,24 +19,24 @@ 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)
|
||||
{
|
||||
|
||||
_uint iCnt = (iCount == UINT_MAX) ? (_uint)m_pSRVs.size() : iCount;
|
||||
return pShader->Bind_SRVs(pConstantName, m_pSRVs.data(), 0, iCnt);
|
||||
_uint iCnt = (iCount == UINT_MAX) ? (_uint)m_SRVs.size() : iCount;
|
||||
return pShader->Bind_SRVs(pConstantName, m_SRVs.data(), 0, iCnt);
|
||||
}
|
||||
|
||||
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))) {
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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
@@ -4,6 +4,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();
|
||||
|
||||
@@ -28,7 +28,7 @@ class ENGINE_DLL CTexture final :
|
||||
HRESULT ParseTexturePathToSRVs(const _tchar* pTextureFolderPath);
|
||||
|
||||
private:
|
||||
vector<ID3D11ShaderResourceView*> m_pSRVs = { nullptr };
|
||||
vector<ID3D11ShaderResourceView*> m_SRVs = { };
|
||||
|
||||
public:
|
||||
static CTexture* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, TEXTURE_LOAD_TYPE eType, const _tchar* pTextureFilePath, const _wstring& wstrTextureKey, _uint iNumTextures);
|
||||
|
||||
@@ -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