Compare commits

...

8 Commits

Author SHA1 Message Date
246db7fc73 ignore vendor 2026-02-02 18:01:29 -06:00
1cea44a84a EGL instead of GL 2026-02-02 17:46:04 -06:00
eaaa30ca90 EGL instead of GL 2026-02-02 17:35:51 -06:00
889b852f5f update flake 2026-02-02 17:35:03 -06:00
9716a8ec46 try macro 2026-02-02 15:25:29 -06:00
7a73c3fc72 try platform check for glfw 2026-02-02 15:19:08 -06:00
c069267c7e update GLFW Error callback 2026-02-02 14:20:40 -06:00
6459d880c3 update Print with events 2026-02-02 13:39:47 -06:00
7 changed files with 43 additions and 35 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
vendor/*

View File

@@ -64,9 +64,9 @@
-DRENDERER=1 \
-DWINDOW=1 \
-I include -I $imgui -I . \
-lGL -lglfw -lGLEW \
-lEGL -lglfw -lGLEW \
-Wall \
-o $name
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
'';
installPhase = ''
@@ -106,9 +106,9 @@
-DRENDERER=1 \
-DWINDOW=1 \
-I include -I $imgui -I . \
-lGL -lglfw -lGLEW \
-lEGL -lglfw -lGLEW \
-Wall \
-o $name
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
'';
installPhase = ''

View File

@@ -171,9 +171,9 @@
-DTESTIMGUI_DYNAMIC \
-fpic -shared \
-I include -I $imgui -I . \
-lGL -lglfw -lGLEW \
-lEGL -lglfw -lGLEW \
-Wall \
-o $name
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
'';
installPhase = ''
@@ -214,9 +214,9 @@
-DCALCULATOR_DYNAMIC \
-fpic -shared \
-I include -I $imgui -I . \
-lGL -lglfw -lGLEW \
-lEGL -lglfw -lGLEW \
-Wall \
-o $name
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
'';
installPhase = ''
@@ -360,9 +360,9 @@
-DWINDOW=1 \
-fpic -shared \
-I include -I $imgui -I . \
-lGL -lglfw -lGLEW \
-lEGL -lglfw -lGLEW \
-Wall \
-o $name
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
'';
installPhase = ''
@@ -407,9 +407,9 @@
-DWINDOW=2 \
-fpic -shared \
-I include -I $imgui -I . \
-lGL -lSDL3 -lGLEW \
-lEGL -lSDL3 -lGLEW \
-Wall \
-o $name
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
'';
installPhase = ''
@@ -450,9 +450,9 @@
-DTERMINAL_DYNAMIC \
-fpic -shared \
-I include -I $imgui -I . \
-lGL -lglfw -lGLEW \
-lEGL -lglfw -lGLEW \
-Wall \
-o $name
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
'';
installPhase = ''
@@ -496,11 +496,11 @@
-DOLLAMA_DYNAMIC \
-fpic -shared \
-I include -I $imgui -I . \
-lGL -lglfw -lGLEW \
-lEGL -lglfw -lGLEW \
$(curl-config --cflags) \
$(curl-config --libs) \
-Wall \
-o $name
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
'';
installPhase = ''

20
flake.lock generated
View File

@@ -3,11 +3,11 @@
"clay": {
"flake": false,
"locked": {
"lastModified": 1746753934,
"narHash": "sha256-7Kx536YsmPTXUjs/jBknGAmqYsqqDh6T11AlarTeGLM=",
"lastModified": 1767081147,
"narHash": "sha256-DbNZXjHAl2cmsWtDyw8BpW6dF7VoWHZ9EvQytSpqaKI=",
"owner": "nicbarker",
"repo": "clay",
"rev": "76265e4c3c97ebe5a4aab081d5c5a05e5a979d5d",
"rev": "76ec3632d80c145158136fd44db501448e7b17c4",
"type": "github"
},
"original": {
@@ -19,11 +19,11 @@
"imgui": {
"flake": false,
"locked": {
"lastModified": 1747034542,
"narHash": "sha256-kVbyG7LXXHIOiI6dlZVID9DLErR+XNoAGp/R82TEpgo=",
"lastModified": 1769795052,
"narHash": "sha256-JRA4E/aFcEEoB9FYHcLcEs4tgcX41ix2VjMV61PVQeA=",
"owner": "ocornut",
"repo": "imgui",
"rev": "e33069ce56d07751ca875eb239f41febef0ebcd3",
"rev": "913a3c60561bb07e8fd410ec7d4a8f6f485defd6",
"type": "github"
},
"original": {
@@ -35,16 +35,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1746957726,
"narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=",
"lastModified": 1769900590,
"narHash": "sha256-I7Lmgj3owOTBGuauy9FL6qdpeK2umDoe07lM4V+PnyA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a39ed32a651fdee6842ec930761e31d1f242cb94",
"rev": "41e216c0ca66c83b12ab7a98cc326b5db01db646",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}

View File

@@ -2,7 +2,7 @@
description = "Build Project Archimedes";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
imgui = {
url = "github:ocornut/imgui?ref=docking";
flake = false;
@@ -114,9 +114,9 @@
-DRENDERER=1 \
-DWINDOW=1 \
-DWINDOWMODULE_DYNAMIC \
-lGL -lglfw -lGLEW \
-lEGL -lglfw -lGLEW \
-Wall \
-o $name
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
'';
installPhase = ''
@@ -157,9 +157,9 @@
-DCUSTOMFONT=${pkgs.fira-code}/share/fonts/truetype/FiraCode-VF.ttf \
-fpic -shared \
-I include -I $imgui -I . \
-lGL -lglfw -lGLEW \
-lEGL -lglfw -lGLEW \
-Wall \
-o $name
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
'';
installPhase = ''
@@ -243,9 +243,9 @@
-DMAINGUI_DYNAMIC \
-fpic -shared \
-I include -I $imgui -I . \
-lGL -lglfw -lGLEW \
-lEGL -lglfw -lGLEW \
-Wall \
-o $name
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
'';
installPhase = ''

View File

@@ -7,6 +7,7 @@
#include "utils/Window/WindowEvents.h"
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
@@ -20,11 +21,16 @@ namespace Archimedes {
WindowGLFW(Window* p, const std::function<void(Event*)>& sendEvent) {
/*if(glfwPlatformSupported(GLFW_PLATFORM_WAYLAND)) {
glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_WAYLAND);
}*/
data.window = p;
data.sendEvent = sendEvent;
glfwSetErrorCallback([](int e, const char* m){
std::cout << "GLFW Error: " << m << std::endl;
std::cout << "GLFW Error " << e << ": " << m << std::endl;
});
if(!glfwInit()) {
@@ -34,6 +40,7 @@ namespace Archimedes {
w = glfwCreateWindow(640, 480, "Archimedes", NULL, NULL);
if(!w) {
std::cout << "glfwCreateWindow failed!\n";
glfwTerminate();
std::abort();
}

View File

@@ -13,5 +13,5 @@ Print::~Print() {
void Print::run() {
std::cout << "Print lib loaded and run!\n";
app->stopModule(name);
app->emitEvent(new Archimedes::DoUnloadModuleEvent(name));
}