Skip to content

feature: using Coral instead #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,9 @@ vendor/premake/bin/
StarEditor/Resources/Scripts/StarEngine-ScriptCore.dll
StarEditor/Resources/Scripts/StarEngine-ScriptCore.pdb
StarEditor/SandboxProject/Assets/Scripts/Binaries
StarEngine-ScriptCore/StarEngine-ScriptCore.csproj.user
StarEditor/DotNet
StarEditor/SandboxProject/Assets/Scripts/obj
StarEngine-ScriptCore/obj
StarEditor/Resources/Scripts/net8.0
StarEngine/vendor/GLAD/bin/Debug-windows-x86_64/GLAD
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@
[submodule "StarEngine/vendor/msdf-atlas-gen"]
path = StarEngine/vendor/msdf-atlas-gen
url = https://github.com/sheazywi/msdf-atlas-gen
[submodule "StarEngine/vendor/Coral"]
path = StarEngine/vendor/Coral
url = https://github.com/StudioCherno/Coral.git
7 changes: 4 additions & 3 deletions Dependencies.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,22 @@ IncludeDir["ImGuizmo"] = "%{wks.location}/StarEngine/vendor/imguizmo"
IncludeDir["glm"] = "%{wks.location}/StarEngine/vendor/glm"
IncludeDir["filewatch"] = "%{wks.location}/StarEngine/vendor/filewatch"
IncludeDir["entt"] = "%{wks.location}/StarEngine/vendor/entt/include"
IncludeDir["mono"] = "%{wks.location}/StarEngine/vendor/mono/include"
IncludeDir["shaderc"] = "%{wks.location}/StarEngine/vendor/shaderc/include"
IncludeDir["SPIRV_Cross"] = "%{wks.location}/StarEngine/vendor/SPIRV-Cross"
IncludeDir["VulkanSDK"] = "%{VULKAN_SDK}/Include"
IncludeDir["msdfgen"] = "%{wks.location}/StarEngine/vendor/msdf-atlas-gen/msdfgen"
IncludeDir["msdf_atlas_gen"] = "%{wks.location}/StarEngine/vendor/msdf-atlas-gen/msdf-atlas-gen"
IncludeDir["miniaudio"] = "%{wks.location}/StarEngine/vendor/miniaudio/include"
IncludeDir["Coral"] = "%{wks.location}/StarEngine/vendor/Coral/Coral.Native/Include"
IncludeDir["MagicEnum"] = "%{wks.location}/StarEngine/vendor/magic_enum/include"

LibraryDir = {}

LibraryDir["VulkanSDK"] = "%{VULKAN_SDK}/Lib"
LibraryDir["Mono"] = "%{wks.location}/StarEngine/vendor/mono/lib/%{cfg.buildcfg}"
LibraryDir["Coral"] = "%{wks.location}/StarEngine/vendor/Coral/Build/%{cfg.buildcfg}"

Library = {}
Library["mono"] = "%{LibraryDir.Mono}/libmono-static-sgen.lib"
Library["Coral"] = "%{LibraryDir.Coral}/Coral.Native.lib"
Library["Vulkan"] = "%{LibraryDir.VulkanSDK}/vulkan-1.lib"
Library["VulkanUtils"] = "%{LibraryDir.VulkanSDK}/VkLayer_utils.lib"

Expand Down
9 changes: 6 additions & 3 deletions Sandbox/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ project "Sandbox"
"%{wks.location}/StarEngine/vendor",
"%{IncludeDir.glm}",
"%{IncludeDir.entt}",
"%{IncludeDir.miniaudio}"
"%{IncludeDir.miniaudio}",
"%{IncludeDir.Coral}",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify Coral include directory variable definition.

The Coral include directory reference looks correct, but ensure that %{IncludeDir.Coral} is properly defined in the dependencies configuration.


🏁 Script executed:

#!/bin/bash
# Verify that Coral variables are defined in Dependencies.lua or similar files
echo "Checking for Coral variable definitions..."
rg -i "IncludeDir\.Coral|Library\.Coral" --type lua

Length of output: 427


🏁 Script executed:

#!/bin/bash
# Search for the IncludeDir table definition in all Lua files
echo "Looking for IncludeDir table definitions..."
rg -n "IncludeDir\s*=\s*{" --type lua

# If found, show the lines around the definition to check for a Coral entry
echo "Showing context around any IncludeDir definitions for Coral..."
rg -nC3 "IncludeDir\s*=\s*{[^}]*Coral" --type lua || echo "No direct Coral entry in IncludeDir blocks found"

Length of output: 659


🏁 Script executed:

#!/bin/bash
# 1. Locate any Dependencies.lua (or similarly named) files
echo "Searching for Dependencies*.lua files..."
find . -type f -iname "Dependencies*.lua"

# 2. Search for IncludeDir table initialization
echo -e "\nSearching for 'IncludeDir = {' initializations in Lua files..."
grep -R --include="*.lua" -n "IncludeDir = {" .

# 3. Look for explicit IncludeDir.Coral assignment
echo -e "\nSearching for 'IncludeDir.Coral' definitions..."
grep -R --include="*.lua" -n "IncludeDir\.Coral" .

# 4. Look for Library.Coral assignment as well
echo -e "\nSearching for 'Library.Coral' definitions..."
grep -R --include="*.lua" -n "Library\.Coral" .

Length of output: 1027


Define Coral paths in Dependencies.lua

Dependencies.lua currently initializes IncludeDir = {} and has no entries for Coral. You need to add both the include‐directory and library‐path for Coral so that %{IncludeDir.Coral} and %{Library.Coral} resolve correctly:

• File: Dependencies.lua (around line 5)
Update the tables as follows:

IncludeDir = {
    Coral = "path/to/Coral/include",    -- add this line
    -- …other entries…
}

Library = {
    Coral = "path/to/Coral/lib/Coral.lib",  -- add this line (adjust filename/extension per platform)
    -- …other entries…
}

After adding these, the references in Sandbox/premake5.lua (and StarEngine/ and StarEditor/) will resolve without errors.

🤖 Prompt for AI Agents
In Sandbox/premake5.lua at line 24, the reference to %{IncludeDir.Coral} will
fail because Coral paths are not defined. To fix this, open Dependencies.lua
around line 5 and add entries for Coral in both IncludeDir and Library tables:
set IncludeDir.Coral to the Coral include directory path and Library.Coral to
the Coral library file path (adjusting for platform-specific extensions). This
will ensure the references in premake5.lua and other related files resolve
correctly.

}

links
{
"StarEngine"
"StarEngine",
"yaml-cpp",
"%{Library.Coral}",
}

filter "system:windows"
Expand All @@ -47,4 +50,4 @@ project "Sandbox"
optimize "on"

filter "action:vs2022"
buildoptions { "/utf-8" }
buildoptions { "/utf-8" }
11 changes: 2 additions & 9 deletions StarEditor/SandboxProject/Assets/Scripts/Source/Camera.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StarEngine;

using StarEngine;

namespace Sandbox
namespace StarEngine;
{
Comment on lines +1 to +3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix circular namespace reference.

There's a circular reference issue: the file imports using StarEngine; but then declares itself in namespace StarEngine;. This is likely incorrect and could cause compilation issues.

Based on the project structure, this should probably be:

 using StarEngine;

-namespace StarEngine;
+namespace Sandbox;

The Camera class should be in the Sandbox namespace since it's part of the SandboxProject, not the core StarEngine.

🤖 Prompt for AI Agents
In StarEditor/SandboxProject/Assets/Scripts/Source/Camera.cs at the top lines 1
to 3, remove the using directive for StarEngine and change the namespace
declaration from StarEngine to Sandbox to avoid circular namespace references
and correctly reflect that the Camera class belongs to the SandboxProject.

public class Camera : Entity
{
Expand Down Expand Up @@ -45,6 +39,5 @@ void OnUpdate(float ts)
translation += velocity * ts;
Translation = translation;
}

}
}
2 changes: 1 addition & 1 deletion StarEditor/SandboxProject/Assets/Scripts/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
project "Sandbox"
kind "SharedLib"
language "C#"
dotnetframework "4.7.2"
dotnetframework "net8.0"

targetdir ("Binaries")
objdir ("Intermediates")
Expand Down
Binary file removed StarEditor/mono/lib/mono/4.5/Accessibility.dll
Binary file not shown.
Binary file not shown.
Binary file removed StarEditor/mono/lib/mono/4.5/CustomMarshalers.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed StarEditor/mono/lib/mono/4.5/Facades/System.IO.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed StarEditor/mono/lib/mono/4.5/I18N.CJK.dll
Binary file not shown.
Binary file removed StarEditor/mono/lib/mono/4.5/I18N.MidEast.dll
Binary file not shown.
Binary file removed StarEditor/mono/lib/mono/4.5/I18N.Other.dll
Binary file not shown.
Binary file removed StarEditor/mono/lib/mono/4.5/I18N.Rare.dll
Binary file not shown.
Binary file removed StarEditor/mono/lib/mono/4.5/I18N.West.dll
Binary file not shown.
Binary file removed StarEditor/mono/lib/mono/4.5/I18N.dll
Binary file not shown.
Binary file removed StarEditor/mono/lib/mono/4.5/IBM.Data.DB2.dll
Binary file not shown.
Binary file not shown.
1,581 changes: 0 additions & 1,581 deletions StarEditor/mono/lib/mono/4.5/MSBuild/Microsoft.Build.CommonTypes.xsd

This file was deleted.

390 changes: 0 additions & 390 deletions StarEditor/mono/lib/mono/4.5/MSBuild/Microsoft.Build.Core.xsd

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed StarEditor/mono/lib/mono/4.5/Microsoft.Build.dll
Binary file not shown.
50 changes: 0 additions & 50 deletions StarEditor/mono/lib/mono/4.5/Microsoft.Build.xsd

This file was deleted.

Binary file removed StarEditor/mono/lib/mono/4.5/Microsoft.CSharp.dll
Binary file not shown.
142 changes: 0 additions & 142 deletions StarEditor/mono/lib/mono/4.5/Microsoft.CSharp.targets

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading