Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
7f89ac8
Merge branch 'main' into vulkan-cleaning
ravimohan1991 Dec 5, 2025
34c5b3b
More vulkan documentation and minor KarmaGui class description
ravimohan1991 Dec 5, 2025
a293a35
XCode relevant comment in top level cmakelists
ravimohan1991 Dec 7, 2025
b3cb4f1
Removing krpch from header files
ravimohan1991 Dec 7, 2025
e09d983
Removing redundant includes
ravimohan1991 Dec 7, 2025
eff9312
ImGuizmo incarnation in KarmaGuizmo
ravimohan1991 Dec 7, 2025
6305e18
Some minor changes and documentation
ravimohan1991 Dec 7, 2025
ee31522
Conforming attempt to that of Unreal Engine
ravimohan1991 Dec 7, 2025
48bd74b
Moved to further subdirectory
ravimohan1991 Dec 7, 2025
c13ce7d
Moved GameFramework folder to Engine/Classes
ravimohan1991 Dec 7, 2025
fe759a9
Added staticmeshactor
ravimohan1991 Dec 8, 2025
f2995a0
Getting rid of Vulkan image transition validation error
ravimohan1991 Dec 8, 2025
a528645
Removing unnecessary \n from KarmaGui's KR_CORE_INFO
ravimohan1991 Dec 8, 2025
babd36b
Some modifications and additions
ravimohan1991 Dec 9, 2025
b6f5416
Added test hook in EditorLayer to spawn staticmesh actor and to do ad…
ravimohan1991 Dec 10, 2025
772a310
Attempting to utilize UE's way of making a scene
ravimohan1991 Dec 10, 2025
8f3e127
Vulkan Unreal - Phase I
ravimohan1991 Dec 11, 2025
45800e8
Vulkan Unreal - Phase II
ravimohan1991 Dec 12, 2025
ee6d7dc
Code no-compile
ravimohan1991 Dec 13, 2025
b820015
Code compile
ravimohan1991 Dec 13, 2025
3927c51
Vulkan Unreal - Phase III
ravimohan1991 Dec 13, 2025
da793b3
Wrote ShivaUObject routine for UObject desctruction and according cha…
ravimohan1991 Dec 13, 2025
1c908af
Vulkan Unreal - Phase IV
ravimohan1991 Dec 13, 2025
50791cb
Vulkan Unreal - Phase V
ravimohan1991 Dec 14, 2025
de7b0a4
some stuff
ravimohan1991 Dec 14, 2025
7880657
uniform upload seems working
ravimohan1991 Dec 14, 2025
bcb7886
Vulkan Unreal - Phase VI
ravimohan1991 Dec 14, 2025
816fc4f
tentative transform buffer for SMActor
ravimohan1991 Dec 14, 2025
123b652
Karma Unreal RHI - Phase I
ravimohan1991 Dec 15, 2025
22fc67a
Added MacDynamicRHI
ravimohan1991 Dec 15, 2025
e1ec214
More Unreal like code
ravimohan1991 Dec 16, 2025
321a106
Set/Get Actor's transform functional more or less
ravimohan1991 Dec 16, 2025
225ecfe
Minor additions with rectificaitons
ravimohan1991 Dec 16, 2025
08e66e0
VulkanRHI Windows : Phase I
ravimohan1991 Dec 17, 2025
4c1d69d
Basic functional without graphics context
ravimohan1991 Dec 17, 2025
ffc1739
Vulkan Surface creation functional
ravimohan1991 Dec 17, 2025
dc13f62
Logical device creation and destruction
ravimohan1991 Dec 17, 2025
7e969ac
Minor logging edits for better visuals in logs
ravimohan1991 Dec 19, 2025
e9bb3df
VulkanRHI Windows : Phase II
ravimohan1991 Dec 19, 2025
f51d60e
Modified VulkanTexture in accordance with VulkanRHI
ravimohan1991 Dec 19, 2025
48d8638
More doxygen commenting for VulkanDynamicRHI
ravimohan1991 Dec 20, 2025
9186996
VulkanRHI Windows : Phase III
ravimohan1991 Dec 20, 2025
308c6c6
FVulkanSwapChain's swapchain making/creation
ravimohan1991 Dec 20, 2025
f8b5481
Swapchain creation/destruction functional
ravimohan1991 Dec 21, 2025
b657ba0
VulkanRHI Windows : Phase IV
ravimohan1991 Dec 22, 2025
c12c0f5
Little progress on VulkanRenderpass with BuildCreateInfo
ravimohan1991 Dec 24, 2025
53bb1f9
VulkanRHI Windows: Phase V
ravimohan1991 Dec 26, 2025
6344588
Minor comments
ravimohan1991 Dec 26, 2025
0af0154
Adding assertion for appropriate initialization and minor comments
ravimohan1991 Dec 27, 2025
61b9ec7
Some documentation, and renderpass class
ravimohan1991 Dec 29, 2025
f6a7c8a
VulkanRHI Windows: Phase VI
ravimohan1991 Dec 30, 2025
37c5b5e
Single framebuffer making done
ravimohan1991 Dec 31, 2025
f924553
Framebuffer stuff
ravimohan1991 Jan 2, 2026
20763bd
VulkanRHI Mac - Phase VII
ravimohan1991 Jan 6, 2026
0a3fcc8
Minor logging, and other code enhancements
ravimohan1991 Jan 6, 2026
4b0f70c
KarmaGuiVulkanHandler is KarmaGuiRenderer::SetUpKarmaGuiRenderer happy
ravimohan1991 Jan 7, 2026
ec3cfdc
Moving forward with KarmaGuiLayer and ApplicationLayer
ravimohan1991 Jan 8, 2026
879d008
Vulkanbuffer: VulkanContext replaced with VulkanRHI
ravimohan1991 Jan 10, 2026
5356e57
Vulkan RHI Mac - Phase VIII
ravimohan1991 Jan 11, 2026
716772f
RHI compile on Linux
ravimohan1991 Jan 11, 2026
fcc167d
Buggy working on linux maybe because of graphics card
ravimohan1991 Jan 11, 2026
217f309
MSVC receptive code for std::iterator
ravimohan1991 Jan 11, 2026
381ed51
Minor comment
ravimohan1991 Jan 11, 2026
b99778d
Presentation gracefully working on Linux
ravimohan1991 Jan 12, 2026
4ef7344
Prevented race condition on windows by MAX_FRAMES_IN_FLIGHT to 4
ravimohan1991 Jan 13, 2026
fb03cae
More documentation
ravimohan1991 Jan 13, 2026
a8ae936
Dedicated routine for vulkan depthformat and minor documentation
ravimohan1991 Jan 14, 2026
a9ca078
More documentation
ravimohan1991 Jan 14, 2026
f2a9272
More documentation
ravimohan1991 Jan 17, 2026
30c233a
Vulkan texture fading issue
ravimohan1991 Jan 17, 2026
ee1804b
More VulkanRenderPass documentation with help from AI
ravimohan1991 Jan 18, 2026
c36a76c
Merge remote-tracking branch 'origin/vulkan-cleaning' into vulkan-cle…
ravimohan1991 Jan 18, 2026
10a2587
minor documentation for renderpass
ravimohan1991 Jan 18, 2026
4ce55db
Swapchain documentation and Perplexity's debugging
ravimohan1991 Jan 19, 2026
4223f6f
Editor Window : Resizing functional
ravimohan1991 Jan 19, 2026
f51a544
Minor resizing tweaks to prevent validation error
ravimohan1991 Jan 19, 2026
f22b15b
Using reference instead of entire KarmaGui_ImplVulkanH_RHIResources s…
ravimohan1991 Jan 20, 2026
acfdda1
Restoring KarmaVector wrapper for framebuffers and rendertargets
ravimohan1991 Jan 20, 2026
355c575
Minor adjustments for Linux und Mac window
ravimohan1991 Jan 20, 2026
56e4ffd
Minor documentation for swapchain destruction routine in KarmaGuiHandler
ravimohan1991 Jan 21, 2026
c3277c0
Vulkan Synchronization : Phase I
ravimohan1991 Jan 23, 2026
4b704e1
Minor code addition in VulkanSynacronization and documentation
ravimohan1991 Jan 23, 2026
3495d71
Vulkan Synchronization : Phase II
ravimohan1991 Jan 25, 2026
44abeb9
API modification for FenceManager's needs
ravimohan1991 Jan 26, 2026
6450395
Resolving vkwaitforfence stall for macos
ravimohan1991 Jan 26, 2026
5e0e7d2
Minor documentation
ravimohan1991 Jan 26, 2026
a1eee0b
More documentation and cleaning of redundant code
ravimohan1991 Jan 27, 2026
87dd4a8
Class for semaphore
ravimohan1991 Jan 27, 2026
be1939a
resolved continuous scrolling in linux
ravimohan1991 Jan 28, 2026
5d32ebd
Vulkan descriptorset
ravimohan1991 Jan 30, 2026
a54f827
More descriptorsets
ravimohan1991 Jan 31, 2026
d5f8b80
Basic descriptorsets functional with pool creation only
ravimohan1991 Feb 5, 2026
77403d5
Descriptor set allocation with appropriate pool size computation
ravimohan1991 Feb 10, 2026
0bb0dc1
Minor tuning of the code
ravimohan1991 Feb 10, 2026
702c46e
Progress with descriptor sets
ravimohan1991 Feb 11, 2026
28af070
Allocating camera ubo to ubo descriptor set
ravimohan1991 Feb 11, 2026
6c55065
Proceeding with renderpass creation and appropriate resources for off…
ravimohan1991 Feb 12, 2026
5c2f98c
Single mesh loading working
ravimohan1991 Feb 12, 2026
0755a85
Minor fix to address validation warning about buffer in use by comman…
ravimohan1991 Feb 12, 2026
6458cf4
Couple of mesh in scene loading
ravimohan1991 Feb 12, 2026
0d4d2b9
Experimental meddling
ravimohan1991 Feb 12, 2026
b1ec0fa
Minor adjustments
ravimohan1991 Feb 14, 2026
d445490
Game code of transforms from primitivecomponent
ravimohan1991 Feb 14, 2026
2bc4d82
KarmaGuizmo functional
ravimohan1991 Feb 14, 2026
1997bf6
buffer destroy and MSVC decl
ravimohan1991 Feb 15, 2026
9e07e70
KarmaGizmo induced translation
ravimohan1991 Feb 15, 2026
30aa22a
Scene hierarchy basic functional
ravimohan1991 Feb 15, 2026
950606a
transform widget : Phase I
ravimohan1991 Feb 16, 2026
63a74eb
dirty flat und perplexity's position recovery from non uniform scale
ravimohan1991 Feb 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Application/src/KarmaApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ExampleLayer : public Karma::Layer
std::shared_ptr<Karma::UniformBufferObject> shaderUniform;
shaderUniform.reset(Karma::UniformBufferObject::Create({ Karma::ShaderDataType::Mat4, Karma::ShaderDataType::Mat4 }, 0));

m_BlueSQShader.reset(Karma::Shader::Create("../Resources/Shaders/shader.vert", "../Resources/Shaders/shader.frag", shaderUniform, "CylinderShader"));
m_BlueSQShader.reset(Karma::Shader::Create("../Resources/Shaders/shader.vert", "../Resources/Shaders/shader.frag", "CylinderShader"));

m_SquareMat.reset(new Karma::Material());
m_SquareMat->AddShader(m_BlueSQShader);
Expand All @@ -31,7 +31,7 @@ class ExampleLayer : public Karma::Layer
m_Scene.reset(new Karma::Scene());

m_Scene->AddCamera(m_Camera);
m_Scene->AddVertexArray(m_SquareVA);
//m_Scene->AddVertexArray(m_SquareVA);

m_Scene->SetClearColor({ 0.0f, 0.0f, 0.0f, 1 });

Expand Down
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@ set(MAC_PACKAGE FALSE)
# This is so that .app can be installed in KarmaBin
if (APPLE)
if(MAC_PACKAGE)
# We will be needing the install scheme so generate all the schemes
set(CMAKE_XCODE_GENERATE_SCHEME ON CACHE BOOL "")
set(CMAKE_INSTALL_PREFIX "${REPOSITORYROOT}/KarmaBin" CACHE PATH
"Custom install location for .app bundle" FORCE)
else()
# No need for generating all the schemes. Selected schemes can be
# be generated for appropriate targets. See Pranjal
# set_target_properties(Pranjal PROPERTIES
# XCODE_GENERATE_SCHEME TRUE
# XCODE_SCHEME_WORKING_DIRECTORY "${REPOSITORYROOT}/KarmaBin")
set(CMAKE_XCODE_GENERATE_SCHEME OFF CACHE BOOL "")
endif()
endif()
Expand Down Expand Up @@ -81,13 +87,13 @@ add_subdirectory(Karma)
list(APPEND ESSENTIAL_LIBS Karma)

# Build the Client
add_subdirectory(Application)
# add_subdirectory(Application)

# Build the Editor
add_subdirectory(Pranjal)

# Relevant linking of finished Application with the Engine!
target_link_libraries(SandBox PUBLIC KarmaEngine)
# target_link_libraries(SandBox PUBLIC KarmaEngine)
target_link_libraries(Pranjal PUBLIC KarmaEngine)

if (APPLE AND MAC_PACKAGE)
Expand Down
2 changes: 1 addition & 1 deletion GenerateProjects.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set /p Input=Enter y(Yes) or n(No):
If /I "%Input%"=="y" goto yes
goto no
:yes
KarmaBasedProjectName.sln
start "" Game_Of_Lands.slnx
exit
:no
echo Suit yourself! Goodbye!
Expand Down
7 changes: 4 additions & 3 deletions Karma/src/Karma.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
// To be included in clients

// Game code specific includes
#include "Karma/GameFramework/Actor.h"
#include "Karma/GameFramework/World.h"
#include "GameFramework/Actor.h"
#include "GameFramework/World.h"

#include "Karma/GameFramework/Level.h"
#include "Engine/Level.h"

#include "Karma/Application.h"
#include "Karma/Layer.h"
#include "Karma/Log.h"
#include "Karma/KarmaGui/KarmaGuiLayer.h"
#include "Karma/KarmaGui/KarmaGui.h"
#include "Karma/KarmaGui/KarmaGuiInternal.h"
#include "Karma/KarmaGui/KarmaGuizmo.h"
#include "Karma/KarmaGui/KarmaGuiRenderer.h"

#include "Karma/Renderer/Shader.h"
Expand Down
4 changes: 1 addition & 3 deletions Karma/src/Karma/Animation/Animation.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#pragma once

#include "krpch.h"

namespace Karma
{
class KARMA_API Animation
Expand All @@ -12,4 +10,4 @@ namespace Karma

};

}
}
20 changes: 16 additions & 4 deletions Karma/src/Karma/Application.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include "Application.h"
#include "Karma/Log.h"
#include "Karma/Input.h"
#include "Karma/Renderer/Renderer.h"
#include "chrono"
#include "Engine/Engine.h"
#include "Core/UObjectGlobals.h"// to be bundled appropriately in core.h
#include "Core/Package.h"
#include "KarmaRHI/KarmaRHI.h"

namespace Karma
{
Expand All @@ -31,6 +31,9 @@ namespace Karma
m_Window = Window::Create();
m_Window->SetEventCallback(KR_BIND_EVENT_FN(Application::OnEvent)); // Setting the listener

// Initialize RHI (Render Hardware Interface)
RHIInit();

m_LayerStack = new LayerStack();

// Graphics API Vulkan or OpenGL should have been completely initialized by here
Expand All @@ -48,6 +51,10 @@ namespace Karma
// and its context.
KR_CORE_INFO("Deleting stacks");
delete m_LayerStack;

// Deinitialize RHI
RHIExit();

KR_CORE_INFO("Deleting window");
delete m_Window;
s_Instance = nullptr;
Expand Down Expand Up @@ -102,7 +109,14 @@ namespace Karma
deltaTime /= 1000000.0f;

// Tick KEngine
GEngine->Tick(deltaTime, false);
if(GEngine)
{
GEngine->Tick(deltaTime, false);
}

// Ponder over the sequence of this updation
// this includes glfwPollEvents()
m_Window->OnUpdate();

for (auto layer : *m_LayerStack)
{
Expand All @@ -118,8 +132,6 @@ namespace Karma
}

m_KarmaGuiLayer->End();

m_Window->OnUpdate();
}
}

Expand Down
2 changes: 0 additions & 2 deletions Karma/src/Karma/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*/
#pragma once

#include "krpch.h"

#include "Karma/Window.h"
#include "Karma/Events/ApplicationEvent.h"
#include "Karma/Events/ControllerDeviceEvent.h"
Expand Down
8 changes: 8 additions & 0 deletions Karma/src/Karma/Core.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@
#define KR_CORE_ASSERT(expr, ...)
#endif

/**
* @brief Denotes code paths that should never be reached.
*
* @note Taken from the UE
*/
#define checkNoEntry() KR_CORE_ASSERT(false, "Enclosing block should never be called")


/**
* @brief Macro for std::bind routine. See https://en.cppreference.com/w/cpp/utility/functional/bind
*
Expand Down
1 change: 0 additions & 1 deletion Karma/src/Karma/Core/Field.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#pragma once

#include "krpch.h"
#include "UObjectGlobals.h"

namespace Karma
Expand Down
9 changes: 7 additions & 2 deletions Karma/src/Karma/Core/GFrameworkMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

#pragma once

#include "krpch.h"

enum EInternal {EC_InternalUseOnlyConstructor};
typedef void (*ClassConstructorType) (const Karma::FObjectInitializer&);

Expand All @@ -37,12 +35,19 @@ typedef void (*ClassConstructorType) (const Karma::FObjectInitializer&);
* calls default constructor with placement new during UObjectAllocation
* (*InClass->m_ClassConstructor)(FObjectInitializer)
*
* Also defines the routine to destroy (call class destructor) accessible from
* UObjectBase. See KarmaSmriti::ShutDown() for the application.
*
* @see StaticConstructObject_Internal() in UObjectGlobals.cpp
* @remark In UE, this is done in ObjectMacros.h, #define DECLARE_CLASS
*
*/
#define DECLARE_KARMA_CLASS(TClass, TSuperClass) \
public: \
inline virtual void ShivaUObject() override\
{\
this->~TClass();\
} \
DEFINE_DEFAULT_CONSTRUCTOR_CALL(TClass) \
/** Typedef for the base class ({{ typedef-type }}) */ \
typedef TSuperClass Super;\
Expand Down
Loading