Skip to content
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

release 2.0 #110

Merged
merged 148 commits into from
Jan 11, 2025
Merged
Changes from 1 commit
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
7f80671
adding pre compiled header
Kbz-8 Mar 25, 2024
e2ea602
fixing pre compiled header usage, improved compilation time
Kbz-8 Mar 25, 2024
982e3e6
fixing pch compilation error
Kbz-8 Mar 25, 2024
86671b8
fixing pch compilation error
Kbz-8 Mar 25, 2024
abc213c
working glfw support
Kbz-8 Mar 25, 2024
b5983ac
renaming MLX_Window to Window
Kbz-8 Mar 27, 2024
0e04356
begenning the refactor
Kbz-8 Mar 27, 2024
810417a
working
Kbz-8 Apr 21, 2024
f8a856d
working on code refactor
Kbz-8 Apr 23, 2024
be19b71
still working on code refactoring
Kbz-8 Apr 23, 2024
edb4407
still refactor
Kbz-8 Apr 24, 2024
37e9410
removing GLFW support
Kbz-8 May 25, 2024
7ecee71
fixing compoilation issues
Kbz-8 Jul 5, 2024
d5eeef9
big refactoring ! ci skip
Kbz-8 Sep 2, 2024
b7d5545
adding depth buffer, ci skip
Kbz-8 Sep 2, 2024
1b996af
starting to fix compilation issues
Kbz-8 Sep 2, 2024
0a84ea6
fixing compilation issues, working on textures
Kbz-8 Sep 4, 2024
6eaf871
fixing compilation issues
Kbz-8 Sep 4, 2024
77bfe4f
yes
Kbz-8 Sep 13, 2024
f50dd2d
fixing compilation issues
Kbz-8 Sep 14, 2024
14b42a7
fixing macos and windows CI ?
Kbz-8 Sep 14, 2024
9631305
fixing macos and windows CI ?
Kbz-8 Sep 14, 2024
8191191
fixing macos and windows CI ? x3
Kbz-8 Sep 14, 2024
f743fc7
fixing windows build
Kbz-8 Sep 14, 2024
25b605d
fixing windows build x2
Kbz-8 Sep 14, 2024
94873df
fixing windows build x3 | replacing compile commands by compile flags
Kbz-8 Sep 15, 2024
7243c67
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHH
Kbz-8 Sep 15, 2024
7079e1e
implementing mouse move and get screen size, removing warnings
Kbz-8 Sep 15, 2024
527a88e
fixing compilation issues
Kbz-8 Sep 15, 2024
83432cb
fixing warnings in kvf
Kbz-8 Sep 15, 2024
e9a8a0c
working on vulkan loader
Kbz-8 Sep 16, 2024
48801d1
fixing vulkan loader, moving vulkan pfns to RenderCore
Kbz-8 Sep 20, 2024
4ed84d4
fixing SDLManager
Kbz-8 Sep 20, 2024
4e1ae34
removing all singletons
Kbz-8 Sep 20, 2024
8dd6def
fixing kvf issues
Kbz-8 Sep 20, 2024
3f065bc
fixing bugs
Kbz-8 Sep 20, 2024
0b3ca8e
adding debug vulkan resources names
Kbz-8 Sep 21, 2024
c718915
fixing release compilation issue
Kbz-8 Sep 21, 2024
cf773b5
adding shaders compilation in makefile
Kbz-8 Sep 22, 2024
74dd8a0
fixing projection issue
Kbz-8 Oct 17, 2024
0ea0cde
fixing inputs bug, fixing missing depth image destruction in scenes
Kbz-8 Oct 17, 2024
632117a
yes
Kbz-8 Oct 18, 2024
5945549
yes
Kbz-8 Oct 19, 2024
0c35f27
[BOT] update dependencies
Kbz-8 Oct 20, 2024
418feba
update dependencies (#95)
Kbz-8 Oct 20, 2024
c7484b7
fixing put pixel, adding scene change checker
Kbz-8 Oct 20, 2024
8f757ca
yes
Kbz-8 Oct 21, 2024
05d07e5
bozoman solution
Kbz-8 Oct 21, 2024
e7cb785
working on fonts
Kbz-8 Oct 21, 2024
aa26e52
fixing compilation issues
Kbz-8 Oct 22, 2024
cfb41b7
yes
Kbz-8 Oct 22, 2024
101b8da
this feel so wrong
Namonay Oct 24, 2024
92c8014
Merge branch '2.0-dev' of github.com:Namonay/MacroLibX into 2.0-dev
Namonay Oct 24, 2024
47d0cfb
this feels wrong
Namonay Oct 24, 2024
d8a6676
better naming and removed todo🤓
Namonay Oct 24, 2024
da85343
yes
Kbz-8 Oct 24, 2024
185a2b7
Merge branch 'seekrs:2.0-dev' into 2.0-dev
Namonay Oct 25, 2024
ef61b79
2.0 devFixing putpixel and put image overlapping incorrectly after a …
Kbz-8 Oct 25, 2024
d4bd8b6
working on texts and fonts
Kbz-8 Oct 26, 2024
c6d6c82
[BOT] update dependencies
Kbz-8 Oct 27, 2024
d3bf250
update dependencies (#98)
Kbz-8 Oct 27, 2024
1721632
pushing for vavaas to debug
Kbz-8 Oct 27, 2024
7724001
fixing segfault at exit
Kbz-8 Oct 27, 2024
f7ddf3c
add: bring textures to draw layer
Namonay Oct 27, 2024
df05148
Cleaned code
Namonay Oct 27, 2024
245d556
Formatting
Namonay Oct 28, 2024
51427dc
Fixing layering issues with text and textures (#99)
Kbz-8 Oct 28, 2024
3153941
yes
Kbz-8 Oct 28, 2024
524da32
yes
Kbz-8 Oct 28, 2024
ea950a1
yes
Kbz-8 Oct 31, 2024
601c243
fixing texts
Kbz-8 Oct 31, 2024
fc404a4
updating example
Kbz-8 Oct 31, 2024
77f1a2d
added show and hide cursor support, fixing technological debt from or…
Kbz-8 Oct 31, 2024
af70e2e
yes
Kbz-8 Nov 3, 2024
21964fc
[BOT] update dependencies
Kbz-8 Nov 3, 2024
142ea2d
update dependencies (#100)
Kbz-8 Nov 4, 2024
5bd66fd
adding clear color in mlx_clear_window
Kbz-8 Nov 4, 2024
d1a5bce
fixing bug with image recreation
Kbz-8 Nov 5, 2024
8d879fb
improving BringToLayer
Kbz-8 Nov 5, 2024
71d1c20
adding nesting to debug logs
Kbz-8 Nov 5, 2024
35b7408
adding transformations
Kbz-8 Nov 13, 2024
f27e5ef
fixing linux build failure
Kbz-8 Nov 13, 2024
f401b36
fixing rotation
Kbz-8 Nov 14, 2024
c85a30e
working on rtt
Kbz-8 Nov 14, 2024
89b1ae4
yes (#102)
Kbz-8 Nov 22, 2024
50edf78
[BOT] update dependencies
Kbz-8 Nov 24, 2024
b8966d5
update dependencies (#103)
Kbz-8 Nov 24, 2024
17fcb85
working on swapchains
Kbz-8 Nov 26, 2024
e29f5e7
[BOT] update dependencies
Kbz-8 Dec 1, 2024
56fec8d
update dependencies (#104)
Kbz-8 Dec 3, 2024
ec2c444
fixing window resizing
Kbz-8 Dec 4, 2024
5529bbd
adding missing include
Kbz-8 Dec 4, 2024
cda4faa
adding compiler version info to makefile header
Kbz-8 Dec 4, 2024
1bf92b3
adding include check
Kbz-8 Dec 4, 2024
37ea1b1
enabling pre compiled header
Kbz-8 Dec 4, 2024
fc74873
yes
Kbz-8 Dec 4, 2024
841d140
working on subpass dependencies
Kbz-8 Dec 4, 2024
97ea5e3
trying to fix merge conflicts
Kbz-8 Dec 4, 2024
9bb95be
fetching deps
Kbz-8 Dec 4, 2024
e1add20
officially push 2.0 to test (#105)
Kbz-8 Dec 4, 2024
5a04ad7
moving experimental features to a new folder
Kbz-8 Dec 4, 2024
5d4d97e
fixing valgrind issues, injecting garbage collector inside vulkan's f…
Kbz-8 Dec 13, 2024
f533388
working on garbage collection, fixing small issues with font destroy
Kbz-8 Dec 14, 2024
0622684
rewritting parts of the API; ci skip
Kbz-8 Dec 14, 2024
323b16f
reworking application and bridge
Kbz-8 Dec 15, 2024
11ccc04
adding missing function implementation
Kbz-8 Dec 15, 2024
ab4d67d
finxing memory usages
Kbz-8 Dec 16, 2024
4987a8c
implementing last functions, adding put pixel region
Kbz-8 Dec 16, 2024
47f6bc7
fixing macos compilation issue
Kbz-8 Dec 16, 2024
7d407fc
adding gcc13 to CI
Kbz-8 Dec 16, 2024
d379e5a
fixing windows compilation issue
Kbz-8 Dec 16, 2024
17ae77d
update action images
Kbz-8 Dec 16, 2024
9183e7c
installing SDL2 framework in macos action
Kbz-8 Dec 16, 2024
d3808cd
revert
Kbz-8 Dec 16, 2024
335c797
fixing homebrew path
Kbz-8 Dec 16, 2024
30328b1
fixing bug in texture clear
Kbz-8 Dec 16, 2024
42e62ac
working on endianness with vulkan images
Kbz-8 Dec 16, 2024
213a8f6
implementing endianness check on mlx_color struct
Kbz-8 Dec 16, 2024
905859a
changing endianness getter
Kbz-8 Dec 16, 2024
24d9b4b
fixing gcc/msvc error
Kbz-8 Dec 16, 2024
6de8d3a
fixing gcc/msvc error
Kbz-8 Dec 17, 2024
8f4dc6e
fixing gcc/msvc error
Kbz-8 Dec 17, 2024
ffff472
adding multiple hooks supports for events and loop
Kbz-8 Dec 17, 2024
b6660b9
fixing documentation in headers
Kbz-8 Dec 17, 2024
b6edf44
re-adding render to texture
Kbz-8 Dec 20, 2024
036fa0e
[BOT] update dependencies
Kbz-8 Dec 22, 2024
f071316
update dependencies (#106)
Kbz-8 Dec 22, 2024
f670805
fixing vicious bug in scene code
Kbz-8 Dec 27, 2024
cd906ca
Merge branch 'indev' of github.com:seekrs/MacroLibX into indev
Kbz-8 Dec 27, 2024
c60c176
wtf is hapenning
Kbz-8 Dec 28, 2024
c6fefe2
[BOT] update dependencies
Kbz-8 Dec 29, 2024
1da9fd7
update dependencies (#107)
Kbz-8 Dec 29, 2024
9874c1f
[BOT] update dependencies
Kbz-8 Jan 5, 2025
aa345c7
update dependencies (#109)
Kbz-8 Jan 5, 2025
54b4582
fixing things
Kbz-8 Jan 7, 2025
f9ef8fc
fixing possible segmentation fault in Texture::SetLinearRegion
Kbz-8 Jan 7, 2025
273255e
fixing transformations
Kbz-8 Jan 7, 2025
55f1df2
fixing haeder
Kbz-8 Jan 8, 2025
427e5aa
fixing macOS issue
Kbz-8 Jan 11, 2025
c6490c9
fixing macOS issue
Kbz-8 Jan 11, 2025
c9870fa
fixing macOS issue
Kbz-8 Jan 11, 2025
285bcda
fixing macOS issue
Kbz-8 Jan 11, 2025
809bea2
fixing macOS issue
Kbz-8 Jan 11, 2025
712ac4b
fixing macOS issue
Kbz-8 Jan 11, 2025
2030534
fixing macOS issue
Kbz-8 Jan 11, 2025
f73fa1b
fixing macOS issue
Kbz-8 Jan 11, 2025
d2a8ac4
fixing macOS issue
Kbz-8 Jan 11, 2025
07f521d
fixing macOS issue
Kbz-8 Jan 11, 2025
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
Prev Previous commit
Next Next commit
fixing SDLManager
  • Loading branch information
Kbz-8 committed Sep 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 4ed84d43c100db706beeee74059ed1c8113eb865
2 changes: 1 addition & 1 deletion runtime/Includes/Core/Application.h
Original file line number Diff line number Diff line change
@@ -47,12 +47,12 @@ namespace mlx
~Application();

private:
RenderCore m_render_core;
FpsManager m_fps;
Inputs m_in;
ImageRegistry m_image_registry;
std::vector<std::unique_ptr<GraphicsSupport>> m_graphics;
std::function<int(Handle)> f_loop_hook;
std::unique_ptr<RenderCore> p_render_core;
Handle p_param = nullptr;
};
}
8 changes: 4 additions & 4 deletions runtime/Includes/Renderer/RenderCore.h
Original file line number Diff line number Diff line change
@@ -9,9 +9,9 @@ namespace mlx

class RenderCore
{
friend class Application;

public:
RenderCore();

[[nodiscard]] MLX_FORCEINLINE VkInstance GetInstance() const noexcept { return m_instance; }
[[nodiscard]] MLX_FORCEINLINE VkInstance& GetInstanceRef() noexcept { return m_instance; }
[[nodiscard]] MLX_FORCEINLINE VkDevice GetDevice() const noexcept { return m_device; }
@@ -31,12 +31,12 @@ namespace mlx
#undef MLX_VULKAN_INSTANCE_FUNCTION
#undef MLX_VULKAN_DEVICE_FUNCTION

~RenderCore();

private:
RenderCore();
void LoadKVFGlobalVulkanFunctionPointers() const noexcept;
void LoadKVFInstanceVulkanFunctionPointers() const noexcept;
void LoadKVFDeviceVulkanFunctionPointers() const noexcept;
~RenderCore();

private:
static RenderCore* s_instance;
4 changes: 3 additions & 1 deletion runtime/Sources/Core/Application.cpp
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

namespace mlx
{
Application::Application() : m_render_core(), m_fps(), m_in()
Application::Application() : m_fps(), m_in()
{
EventBus::RegisterListener({[](const EventBase& event)
{
@@ -18,6 +18,7 @@ namespace mlx

m_fps.Init();
SDLManager::Get().Init();
p_render_core = std::make_unique<RenderCore>();
}

void Application::Run() noexcept
@@ -87,6 +88,7 @@ namespace mlx

Application::~Application()
{
p_render_core.reset();
SDLManager::Get().Shutdown();
}
}
20 changes: 10 additions & 10 deletions runtime/Sources/Core/SDLManager.cpp
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ namespace mlx
constexpr const std::uint32_t amask = 0xff000000;
#endif

namespace details
namespace Internal
{
struct WindowInfos
{
@@ -101,9 +101,9 @@ namespace mlx
DebugLog("SDL Manager initialized");
}

void* SDLManager::CreateWindow(const std::string& title, std::size_t w, std::size_t h, bool hidden)
Handle SDLManager::CreateWindow(const std::string& title, std::size_t w, std::size_t h, bool hidden)
{
details::WindowInfos* infos = new details::WindowInfos;
Internal::WindowInfos* infos = new Internal::WindowInfos;
Verify(infos != nullptr, "SDL : window allocation failed");

infos->window = SDL_CreateWindow(title.c_str(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, w, h, SDL_WINDOW_VULKAN | (hidden ? SDL_WINDOW_HIDDEN : SDL_WINDOW_SHOWN));
@@ -117,11 +117,11 @@ namespace mlx
return infos;
}

void SDLManager::DestroyWindow(void* window) noexcept
void SDLManager::DestroyWindow(Handle window) noexcept
{
Verify(m_windows_registry.find(window) != m_windows_registry.end(), "SDL : cannot destroy window; unknown window pointer");

details::WindowInfos* infos = static_cast<details::WindowInfos*>(window);
Internal::WindowInfos* infos = static_cast<Internal::WindowInfos*>(window);
if(infos->window != nullptr)
SDL_DestroyWindow(infos->window);
if(infos->icon != nullptr)
@@ -134,7 +134,7 @@ namespace mlx
VkSurfaceKHR SDLManager::CreateVulkanSurface(Handle window, VkInstance instance) const noexcept
{
VkSurfaceKHR surface;
if(!SDL_Vulkan_CreateSurface(static_cast<SDL_Window*>(window), instance, &surface))
if(!SDL_Vulkan_CreateSurface(static_cast<Internal::WindowInfos*>(window)->window, instance, &surface))
FatalError("SDL : could not create a Vulkan surface; %", SDL_GetError());
return surface;
}
@@ -169,27 +169,27 @@ namespace mlx
Vec2ui SDLManager::GetVulkanDrawableSize(Handle window) const noexcept
{
Vec2i extent;
SDL_Vulkan_GetDrawableSize(static_cast<SDL_Window*>(window), &extent.x, &extent.y);
SDL_Vulkan_GetDrawableSize(static_cast<Internal::WindowInfos*>(window)->window, &extent.x, &extent.y);
return Vec2ui{ extent };
}

void SDLManager::MoveMouseOnWindow(Handle window, int x, int y) const noexcept
{
SDL_WarpMouseInWindow(static_cast<SDL_Window*>(window), x, y);
SDL_WarpMouseInWindow(static_cast<Internal::WindowInfos*>(window)->window, x, y);
SDL_PumpEvents();
}

void SDLManager::GetScreenSizeWindowIsOn(Handle window, int* x, int* y) const noexcept
{
SDL_DisplayMode DM;
SDL_GetDesktopDisplayMode(SDL_GetWindowDisplayIndex(static_cast<SDL_Window*>(window)), &DM);
SDL_GetDesktopDisplayMode(SDL_GetWindowDisplayIndex(static_cast<Internal::WindowInfos*>(window)->window), &DM);
*x = DM.w;
*y = DM.h;
}

void SDLManager::SetWindowPosition(Handle window, int x, int y) const noexcept
{
SDL_SetWindowPosition(static_cast<SDL_Window*>(window), x, y);
SDL_SetWindowPosition(static_cast<Internal::WindowInfos*>(window)->window, x, y);
}

std::int32_t SDLManager::GetX() const noexcept
6 changes: 3 additions & 3 deletions runtime/Sources/Renderer/RenderCore.cpp
Original file line number Diff line number Diff line change
@@ -27,19 +27,19 @@ namespace mlx

void ErrorCallback(const char* message) noexcept
{
FatalError(message, 0, "", "");
Logs::Report(LogType::FatalError, 0, "", "", message);
std::cout << std::endl;
}

void ValidationErrorCallback(const char* message) noexcept
{
Error(message, 0, "", "");
Logs::Report(LogType::Error, 0, "", "", message);
std::cout << std::endl;
}

void ValidationWarningCallback(const char* message) noexcept
{
Warning(message, 0, "", "");
Logs::Report(LogType::Warning, 0, "", "", message);
std::cout << std::endl;
}