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:
@@ -5,6 +5,7 @@
|
||||
#include <Renderer/Renderer.h>
|
||||
#include <Graphics/Scene.h>
|
||||
#include <Graphics/Sprite.h>
|
||||
#include <Graphics/PutPixelManager.h>
|
||||
#include <Renderer/ScenesRenderer.h>
|
||||
#include <Maths/Mat4.h>
|
||||
|
||||
@@ -39,6 +40,7 @@ namespace mlx
|
||||
private:
|
||||
Renderer m_renderer;
|
||||
SceneRenderer m_scene_renderer;
|
||||
PutPixelManager m_put_pixel_manager;
|
||||
std::shared_ptr<Window> p_window;
|
||||
std::unique_ptr<Scene> p_scene;
|
||||
|
||||
|
||||
@@ -7,12 +7,19 @@ namespace mlx
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
p_scene->ResetSprites();
|
||||
m_put_pixel_manager.ResetRenderData();
|
||||
m_current_depth = 0;
|
||||
}
|
||||
|
||||
void GraphicsSupport::PixelPut(int x, int y, std::uint32_t color) noexcept
|
||||
{
|
||||
MLX_PROFILE_FUNCTION();
|
||||
NonOwningPtr<Texture> texture = m_put_pixel_manager.DrawPixel(x, y, m_current_depth, color);
|
||||
if(texture)
|
||||
{
|
||||
Sprite& new_sprite = p_scene->CreateSprite(texture);
|
||||
new_sprite.SetPosition(Vec3f{ 0.0f, 0.0f, static_cast<float>(m_current_depth) });
|
||||
}
|
||||
}
|
||||
|
||||
void GraphicsSupport::StringPut(int x, int y, std::uint32_t color, std::string str)
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace mlx
|
||||
namespace mlx
|
||||
{
|
||||
#undef DebugLog
|
||||
#define DebugLog(...) DebugLog(__LINE__, __FILE__, AK_FUNC_SIG, __VA_ARGS__)
|
||||
#define DebugLog(...) DebugLog(__LINE__, __FILE__, __func__, __VA_ARGS__)
|
||||
|
||||
#undef Message
|
||||
#define Message(...) Message(__LINE__, __FILE__, __func__, __VA_ARGS__)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef __MLX_MEMORY__
|
||||
#define __MLX_MEMORY__
|
||||
|
||||
#include <Utils/Singleton.h>
|
||||
|
||||
namespace mlx
|
||||
{
|
||||
class MemManager : public Singleton<MemManager>
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace mlx
|
||||
std::vector<const char*> GetRequiredVulkanInstanceExtentions(Handle window) const noexcept;
|
||||
Vec2ui GetVulkanDrawableSize(Handle window) const noexcept;
|
||||
|
||||
inline void SetEventCallback(func::function<void(mlx_event_type, int, void*)> functor, void* userdata) { f_callback = std::move(functor); p_callback_data = userdata; }
|
||||
inline void SetEventCallback(func::function<void(mlx_event_type, int, int, void*)> functor, void* userdata) { f_callback = std::move(functor); p_callback_data = userdata; }
|
||||
|
||||
private:
|
||||
SDLManager() = default;
|
||||
@@ -28,7 +28,7 @@ namespace mlx
|
||||
|
||||
private:
|
||||
std::unordered_set<Handle> m_windows_registry;
|
||||
func::function<void(mlx_event_type, int, void*)> f_callback;
|
||||
func::function<void(mlx_event_type, int, int, void*)> f_callback;
|
||||
void* p_callback_data = nullptr;
|
||||
std::int32_t m_x;
|
||||
std::int32_t m_y;
|
||||
|
||||
Reference in New Issue
Block a user