Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
T-rvw committed Sep 18, 2023
1 parent a2faff3 commit 95d6d08
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 12 deletions.
29 changes: 21 additions & 8 deletions Engine/Source/Editor/UILayers/Inspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,14 @@ void UpdateComponentWidget<engine::MaterialComponent>(engine::SceneWorld* pScene
for (int textureTypeValue = 0; textureTypeValue < static_cast<int>(cd::MaterialTextureType::Count); ++textureTypeValue)
{
auto textureType = static_cast<cd::MaterialTextureType>(textureTypeValue);
if (engine::MaterialComponent::TextureInfo* pTextureInfo = pMaterialComponent->GetTextureInfo(textureType))
bool allowNoTextures = textureType == cd::MaterialTextureType::BaseColor ||
textureType == cd::MaterialTextureType::Emissive ||
textureType == cd::MaterialTextureType::Metallic ||
textureType == cd::MaterialTextureType::Roughness;

engine::MaterialComponent::TextureInfo* pTextureInfo = pMaterialComponent->GetTextureInfo(textureType);
bool canCreateTextureParameters = pTextureInfo || allowNoTextures;
if (canCreateTextureParameters)
{
const char* pTextureType = nameof::nameof_enum(static_cast<cd::MaterialTextureType>(textureTypeValue)).data();
bool isOpen = ImGui::CollapsingHeader(pTextureType, ImGuiTreeNodeFlags_AllowItemOverlap | ImGuiTreeNodeFlags_DefaultOpen);
Expand Down Expand Up @@ -205,13 +212,16 @@ void UpdateComponentWidget<engine::MaterialComponent>(engine::SceneWorld* pScene
}
}

if (pTextureInfo->textureHandle != bgfx::kInvalidHandle)
if (pTextureInfo)
{
ImGui::Image(reinterpret_cast<ImTextureID>(pTextureInfo->textureHandle), ImVec2(64, 64));
if (pTextureInfo->textureHandle != bgfx::kInvalidHandle)
{
ImGui::Image(reinterpret_cast<ImTextureID>(pTextureInfo->textureHandle), ImVec2(64, 64));
}

ImGuiUtils::ImGuiVectorProperty("UV Offset", pTextureInfo->GetUVOffset(), cd::Unit::None, cd::Vec2f(0.0f), cd::Vec2f(1.0f), false, 0.01f);
ImGuiUtils::ImGuiVectorProperty("UV Scale", pTextureInfo->GetUVScale());
}

ImGuiUtils::ImGuiVectorProperty("UV Offset", pTextureInfo->GetUVOffset(), cd::Unit::None, cd::Vec2f(0.0f), cd::Vec2f(1.0f), false, 0.01f);
ImGuiUtils::ImGuiVectorProperty("UV Scale", pTextureInfo->GetUVScale());

ImGui::PopID();
}
Expand Down Expand Up @@ -624,13 +634,15 @@ void Inspector::Update()
m_lastSelectedEntity = selectedEntity;
}

constexpr auto flags = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse;
ImGui::Begin(GetName(), &m_isEnable, flags);
if (m_lastSelectedEntity == engine::INVALID_ENTITY)
{
// Call ImGui::Begin to show the panel though we will do nothing.
ImGui::End();
return;
}

constexpr auto flags = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse;
ImGui::Begin(GetName(), &m_isEnable, flags);
ImGui::BeginChild("Inspector");

details::UpdateComponentWidget<engine::NameComponent>(pSceneWorld, m_lastSelectedEntity);
Expand All @@ -650,6 +662,7 @@ void Inspector::Update()
#endif

ImGui::EndChild();

ImGui::End();
}

Expand Down
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,34 @@
[![win64_vs2022_clang](https://github.com/CatDogEngine/CatDogEngine/actions/workflows/win64_vs2022_clang.yml/badge.svg?branch=main)](https://github.com/CatDogEngine/CatDogEngine/actions/workflows/win64_vs2022_clang.yml)

## Snapshots

![image](https://github.com/CatDogEngine/CatDogEngine/assets/75730859/4f1f0006-76e4-40cf-bd3a-ae70ecf4b6b5)
![image](https://github.com/CatDogEngine/CatDogEngine/assets/75730859/6a383b35-a1cd-45fd-98bb-a1d14709cc3e)
![image](https://github.com/CatDogEngine/CatDogEngine/assets/75730859/52ffa26b-6cc7-441a-8441-513ca11b9813)
![image](https://github.com/CatDogEngine/CatDogEngine/assets/75730859/bdeb4f25-fe78-4aca-92ca-8cd39022e194)
![image](https://github.com/CatDogEngine/CatDogEngine/assets/75730859/22da0826-baaa-47e2-b1b2-e49954345fbe)

## Features

* Basic Cross Platform Editor based on ImGui
* Basic Entity/Component Framework
* Basic Physically Based Rendering
* Basic PostEffects
* Bloom
* Exposure
* Gamma Correction
* Tone Mapping
* Basic Scene Graph SDK
* Standard Atmospheric Scattering

## Developing Features

* Animation
* BlendShape
* Skeletion
* JobSystem
* Modern RHI except bgfx
* Particle System
* Procedural Generated Terrain
* RenderGraph
* Skeleton Animation

## TODO List

Expand All @@ -32,7 +42,6 @@
* Foliage Rendering
* Memory Management based on multiple allocators
* Optimized STL specific for GameEngine
* Particle System
* Physical Engine

## ThirdParty
Expand Down

0 comments on commit 95d6d08

Please sign in to comment.