mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 22:53:34 +00:00
fixing compilation issues
This commit is contained in:
@@ -225,7 +225,7 @@ extern "C"
|
||||
return 0;
|
||||
}
|
||||
|
||||
void mlx_set_font(void* mlx, void* win, char* filepath)
|
||||
void mlx_set_font(void* mlx, char* filepath)
|
||||
{
|
||||
MLX_CHECK_APPLICATION_POINTER(mlx);
|
||||
if (filepath == nullptr)
|
||||
@@ -240,12 +240,12 @@ extern "C"
|
||||
return;
|
||||
}
|
||||
if(std::strcmp(filepath, "default") == 0)
|
||||
static_cast<mlx::Application*>(mlx)->LoadFont(win, file, 6.f);
|
||||
static_cast<mlx::Application*>(mlx)->LoadFont(file, 6.f);
|
||||
else
|
||||
static_cast<mlx::Application*>(mlx)->LoadFont(win, file, 16.f);
|
||||
static_cast<mlx::Application*>(mlx)->LoadFont(file, 16.f);
|
||||
}
|
||||
|
||||
void mlx_set_font_scale(void* mlx, void* win, char* filepath, float scale)
|
||||
void mlx_set_font_scale(void* mlx, char* filepath, float scale)
|
||||
{
|
||||
MLX_CHECK_APPLICATION_POINTER(mlx);
|
||||
if (filepath == nullptr)
|
||||
@@ -259,7 +259,7 @@ extern "C"
|
||||
mlx::Error("TTF loader : not a truetype font file '%'", filepath);
|
||||
return;
|
||||
}
|
||||
static_cast<mlx::Application*>(mlx)->LoadFont(win, file, scale);
|
||||
static_cast<mlx::Application*>(mlx)->LoadFont(file, scale);
|
||||
}
|
||||
|
||||
int mlx_clear_window(void* mlx, void* win)
|
||||
|
||||
@@ -87,30 +87,15 @@ namespace mlx
|
||||
return surface;
|
||||
}
|
||||
|
||||
std::vector<const char*> SDLManager::GetRequiredVulkanInstanceExtentions() const noexcept
|
||||
std::vector<const char*> SDLManager::GetRequiredVulkanInstanceExtentions(Handle window) const noexcept
|
||||
{
|
||||
std::vector<const char*> extensions;
|
||||
std::uint32_t count;
|
||||
if(!SDL_Vulkan_GetInstanceExtensions(static_cast<Internal::WindowInfos*>(window)->window, &count, nullptr))
|
||||
FatalError("SDL Manager : could not retrieve Vulkan instance extensions");
|
||||
std::vector<const char*> extensions(count);
|
||||
if(!SDL_Vulkan_GetInstanceExtensions(static_cast<Internal::WindowInfos*>(window)->window, &count, extensions.data()))
|
||||
FatalError("SDL Manager : could not retrieve Vulkan instance extensions");
|
||||
extensions.push_back(VK_KHR_SURFACE_EXTENSION_NAME);
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XCB_KHR
|
||||
extensions.push_back(VK_KHR_XCB_SURFACE_EXTENSION_NAME);
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_KHR
|
||||
extensions.push_back(VK_KHR_XLIB_SURFACE_EXTENSION_NAME);
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
||||
// extensions.push_back(VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME);
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WIN32_KHR
|
||||
extensions.push_back(VK_KHR_WIN32_SURFACE_EXTENSION_NAME);
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_METAL_EXT
|
||||
extensions.push_back(VK_EXT_METAL_SURFACE_EXTENSION_NAME);
|
||||
#endif
|
||||
return extensions;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
#include <PreCompiled.h>
|
||||
|
||||
#include <Graphics/Font.h>
|
||||
#include <Core/Memory.h>
|
||||
|
||||
#define STB_TRUETYPE_IMPLEMENTATION
|
||||
#define STB_malloc(x, u) ((void)(u), MemManager::Get().Malloc(x))
|
||||
#define STB_free(x, u) ((void)(u), MemManager::Get().Free(x))
|
||||
#include <stb_truetype.h>
|
||||
|
||||
namespace mlx
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user