diff --git a/LivePlotter.vcxproj b/LivePlotter.vcxproj
index e443c38..4030fce 100644
--- a/LivePlotter.vcxproj
+++ b/LivePlotter.vcxproj
@@ -71,7 +71,7 @@
- $(SolutionDir)ext\pthreads4w-code\build\Debug;$(SolutionDir)ext\glfw\build\src\Debug;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64)
+ $(SolutionDir)lib;$(SolutionDir)ext\pthreads4w-code\build\Debug;$(SolutionDir)ext\glfw\build\src\Debug;$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64)
$(SolutionDir)ext\pthreads4w-code;$(SolutionDir)ext\glm;$(SolutionDir)ext\glfw\include;$(SolutionDir)inc;$(IncludePath)
$(SolutionDir)bin\$(Platform)\$(Configuration)\
$(SolutionDir)obj\$(Platform)\$(Configuration)\
@@ -146,4 +146,4 @@
-
+
\ No newline at end of file
diff --git a/LivePlotter.vcxproj.filters b/LivePlotter.vcxproj.filters
index 23a472a..8e596b3 100644
--- a/LivePlotter.vcxproj.filters
+++ b/LivePlotter.vcxproj.filters
@@ -30,5 +30,8 @@
Source Files
+
+ Source Files
+
\ No newline at end of file
diff --git a/compile_commands.json b/compile_commands.json
index 58d3b2f..757757e 100644
--- a/compile_commands.json
+++ b/compile_commands.json
@@ -1,37 +1,37 @@
[
{
- "directory": "C:/Users/sethh/Documents/repos/LivePlotter/",
- "command": "\"C:/Users/sethh/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/sethh/Documents/repos/LivePlotter/src/shaders.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/atlmfc/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/cppwinrt\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/inc\"",
- "file": "C:/Users/sethh/Documents/repos/LivePlotter/src/shaders.cpp"
+ "directory": "C:/Users/seth/Documents/repos/LivePlotter/",
+ "command": "\"C:/Users/seth/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/seth/Documents/repos/LivePlotter/src/util.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/atlmfc/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/cppwinrt\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/inc\"",
+ "file": "C:/Users/seth/Documents/repos/LivePlotter/src/util.cpp"
}
,
{
- "directory": "C:/Users/sethh/Documents/repos/LivePlotter/",
- "command": "\"C:/Users/sethh/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/sethh/Documents/repos/LivePlotter/src/main.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/atlmfc/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/cppwinrt\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/inc\"",
- "file": "C:/Users/sethh/Documents/repos/LivePlotter/src/main.cpp"
+ "directory": "C:/Users/seth/Documents/repos/LivePlotter/",
+ "command": "\"C:/Users/seth/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/seth/Documents/repos/LivePlotter/src/shaders.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/atlmfc/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/cppwinrt\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/inc\"",
+ "file": "C:/Users/seth/Documents/repos/LivePlotter/src/shaders.cpp"
}
,
{
- "directory": "C:/Users/sethh/Documents/repos/LivePlotter/",
- "command": "\"C:/Users/sethh/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/sethh/Documents/repos/LivePlotter/src/util.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/atlmfc/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/cppwinrt\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/inc\"",
- "file": "C:/Users/sethh/Documents/repos/LivePlotter/src/util.cpp"
+ "directory": "C:/Users/seth/Documents/repos/LivePlotter/",
+ "command": "\"C:/Users/seth/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/seth/Documents/repos/LivePlotter/src/tcp_server.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/atlmfc/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/cppwinrt\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/inc\"",
+ "file": "C:/Users/seth/Documents/repos/LivePlotter/src/tcp_server.cpp"
}
,
{
- "directory": "C:/Users/sethh/Documents/repos/LivePlotter/",
- "command": "\"C:/Users/sethh/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/sethh/Documents/repos/LivePlotter/src/tcp_server.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/atlmfc/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/cppwinrt\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/inc\"",
- "file": "C:/Users/sethh/Documents/repos/LivePlotter/src/tcp_server.cpp"
+ "directory": "C:/Users/seth/Documents/repos/LivePlotter/",
+ "command": "\"C:/Users/seth/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/seth/Documents/repos/LivePlotter/src/body.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/atlmfc/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/cppwinrt\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/inc\"",
+ "file": "C:/Users/seth/Documents/repos/LivePlotter/src/body.cpp"
}
,
{
- "directory": "C:/Users/sethh/Documents/repos/LivePlotter/",
- "command": "\"C:/Users/sethh/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c \"C:/Users/sethh/Documents/repos/LivePlotter/src/glad.c\" -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/atlmfc/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/cppwinrt\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/inc\"",
- "file": "C:/Users/sethh/Documents/repos/LivePlotter/src/glad.c"
+ "directory": "C:/Users/seth/Documents/repos/LivePlotter/",
+ "command": "\"C:/Users/seth/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/seth/Documents/repos/LivePlotter/src/main.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/atlmfc/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/cppwinrt\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/inc\"",
+ "file": "C:/Users/seth/Documents/repos/LivePlotter/src/main.cpp"
}
,
{
- "directory": "C:/Users/sethh/Documents/repos/LivePlotter/",
- "command": "\"C:/Users/sethh/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/sethh/Documents/repos/LivePlotter/src/body.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/atlmfc/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/cppwinrt\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/inc\"",
- "file": "C:/Users/sethh/Documents/repos/LivePlotter/src/body.cpp"
+ "directory": "C:/Users/seth/Documents/repos/LivePlotter/",
+ "command": "\"C:/Users/seth/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c \"C:/Users/seth/Documents/repos/LivePlotter/src/glad.c\" -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/atlmfc/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/cppwinrt\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/inc\"",
+ "file": "C:/Users/seth/Documents/repos/LivePlotter/src/glad.c"
}
]
diff --git a/inc/tcp_server.hpp b/inc/tcp_server.hpp
index 1d8675e..ceb41b2 100644
--- a/inc/tcp_server.hpp
+++ b/inc/tcp_server.hpp
@@ -10,7 +10,7 @@ struct tcpserver {
SOCKET sock;
array client_socks;
int max_connections;
- addrinfo *addr;
+ addrinfo* addr;
array cbs;
pthread_mutex_t lock;
@@ -18,8 +18,8 @@ struct tcpserver {
pthread_cond_t stop_requested;
};
-bool create_server(tcpserver *server_out, const char* hostname, int port);
-void start_server(tcpserver &s);
-void stop_server(tcpserver &s);
-void send_data(tcpserver &s, SOCKET client, array data);
-void register_recv_cb(tcpserver &s, data_received_cb_t cb);
+bool create_server(tcpserver* server_out, const char* hostname, int port, int max_connections);
+void start_server(tcpserver& s);
+void stop_server(tcpserver& s);
+void send_data(tcpserver& s, SOCKET client, array data);
+void register_recv_cb(tcpserver& s, data_received_cb_t cb);
diff --git a/inc/util.hpp b/inc/util.hpp
index 1e6654a..11f7f9a 100644
--- a/inc/util.hpp
+++ b/inc/util.hpp
@@ -14,5 +14,5 @@ template struct array {
template void append(array& a, T el);
template T pop(array& a);
-template void resize(array& a, size_t new_size);
+template void resize(array& a, size_t new_cap);
bool read_file(array* out, const char* filepath);
diff --git a/src/body.cpp b/src/body.cpp
index 3e9f2f4..7186ba1 100644
--- a/src/body.cpp
+++ b/src/body.cpp
@@ -67,7 +67,7 @@ bool load_body(body* out_body, const char* obj_filepath) {
start = i + 1;
}
}
- if (source[i] == '\n') {
+ if (source[i] == '\n' || source[i] == '\r') {
state = ParserState::PREFIX;
continue;
}
diff --git a/src/main.cpp b/src/main.cpp
index 132e927..69dbbfa 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -8,11 +8,12 @@
#include "util.hpp"
#include "shaders.hpp"
#include "body.hpp"
+#include "tcp_server.hpp"
static GLFWwindow* window;
static float width, height;
-void framebuffer_size_callback(GLFWwindow* window, int w, int h) {
+void framebuffer_size_callback(GLFWwindow* window, int w, int h) {
width = w;
height = h;
glViewport(0, 0, width, height);
@@ -21,7 +22,6 @@ void framebuffer_size_callback(GLFWwindow* window, int w, int h) {
void process_input() {
if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS)
glfwSetWindowShouldClose(window, true);
-
}
static bool mouse_pressed = false;
@@ -50,7 +50,7 @@ static void cursor_position_callback(GLFWwindow* window, double xpos, double ypo
}
if (scroll_pressed) {
- focal_point += strafe_x * (dx/300) + strafe_y * (dy/300);
+ focal_point += strafe_x * (dx / 300) + strafe_y * (dy / 300);
}
double len = glm::length(camera_loc);
@@ -75,12 +75,11 @@ void mouse_button_callback(GLFWwindow* window, int button, int action, int mods)
glfwGetCursorPos(window, &prev_cursor_x, &prev_cursor_y);
}
-void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
-{
+void scroll_callback(GLFWwindow* window, double xoffset, double yoffset) {
glm::vec4 k = camera_t[2];
float d = yoffset;
- camera_loc += k * (d/10 * glm::max(glm::length(camera_loc), 1.0f));
+ camera_loc += k * (d / 10 * max(glm::length(camera_loc), 1.0f));
camera_t = glm::lookAt(camera_loc, focal_point, up);
}
@@ -107,8 +106,12 @@ bool glfw_setup() {
return true;
}
-
int main() {
+ //tcpserver server;
+ //if (!create_server(&server, "127.0.0.1", 5000, 1)) {
+ // //return -1;
+ //}
+
if (!glfw_setup())
return -1;
@@ -126,7 +129,7 @@ int main() {
if (!load_shader(&shader, vertex_filepath, fragment_filepath))
return -1;
- //glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
+ // glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT); // Write to back buffer
@@ -147,9 +150,9 @@ int main() {
b2.pose = glm::translate(b.pose, glm::vec3(2, 0, 0));
b2.color = glm::vec4(0, 0.5, 0, 1);
- //glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- //set_uniform(shader, "color", glm::vec4 { sin(time), sin(time + glm::radians(45.0f)), sin(time + glm::radians(90.0f)), 1.0 } / 2.0f);
- //time = glfwGetTime();
+ // glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+ // set_uniform(shader, "color", glm::vec4 { sin(time), sin(time + glm::radians(45.0f)), sin(time +
+ // glm::radians(90.0f)), 1.0 } / 2.0f); time = glfwGetTime();
glDisable(GL_CULL_FACE);
glEnable(GL_DEPTH_TEST);
diff --git a/src/tcp_server.cpp b/src/tcp_server.cpp
index 4421d6a..1ef253f 100644
--- a/src/tcp_server.cpp
+++ b/src/tcp_server.cpp
@@ -1,6 +1,7 @@
#include
#include
#pragma comment(lib, "pthreadVC3d.lib")
+#pragma comment(lib, "WS2_32.Lib")
// I hate windows. I hate windows. I hate windows.
@@ -26,20 +27,21 @@ bool create_server(tcpserver* server_out, const char* hostname, int port, int ma
winsock_initialized = true;
return false;
}
+ SOCKET sock;
// ********** Addr Info Creation **********
- addrinfo *result, *ptr, hints;
+ addrinfo *result, hints;
char port_str[16];
_itoa_s(port, port_str, 10);
// TODO: Ensure hostname is null-terminated
- int status = getaddrinfo(hostname, port_str, &hints, result);
+ int status = getaddrinfo(hostname, port_str, &hints, &result);
if (status != 0) {
printf("Error at getaddrinfo(): %d\n", status);
goto fail_cleanup;
}
// *********** Socket Creation ************
- SOCKET sock = socket(result->ai_family, result->ai_socktype, result->ai_protocol);
+ sock = socket(result->ai_family, result->ai_socktype, result->ai_protocol);
if (sock == INVALID_SOCKET) {
printf("Error at socket(): %d\n", WSAGetLastError());
freeaddrinfo(result);
@@ -65,35 +67,36 @@ fail_cleanup:
void start_server(tcpserver& s) { }
void stop_server(tcpserver& s) { }
void send_data(tcpserver& s, SOCKET client, array data) { }
-void register_cb(tcpserver& s, data_received_cb_t cb) { append(s.cbs, cb); }
+//void register_recv_cb(tcpserver& s, data_received_cb_t cb) { append(s.cbs, cb); }
-void _server_loop(void* args) {
- tcpserver* s = static_cast(args);
-
- int num_connections = 0;
- int slots[s->max_connections];
- array open_slots
- = { .data = slots, .len = (size_t)s->max_connections, .cap = (size_t)s->max_connections };
- for (int i = 0; i < open_slots.len; i++) {
- open_slots[i] = open_slots.len - (i + 1);
- }
-
- SOCKET clients[s->max_connections];
- memset(clients, INVALID_SOCKET, sizeof(SOCKET));
- while (true) {
- while (num_connections < s->max_connections) {
- int slot = pop(open_slots);
- clients[slot] = accept(s->sock, NULL, NULL);
- // TODO: More robust handling of bad client sockets
- if (clients[slot] == INVALID_SOCKET) {
- printf("Error at accept(): %d\n", WSAGetLastError());
- stop_server(*s);
- return;
- }
- _start_conn_loop(clients[slot]);
- }
- }
-}
+//void _server_loop(void* args) {
+// tcpserver* s = static_cast(args);
+//
+// int num_connections = 0;
+// int mc = s->max_connections;
+// array open_slots = {
+// .data = (int*)malloc(sizeof(int)*mc), .len = (size_t)mc, .cap = (size_t)mc
+// };
+// for (int i = 0; i < open_slots.len; i++) {
+// open_slots[i] = open_slots.len - (i + 1);
+// }
+//
+// array clients = { (SOCKET*)malloc(sizeof(SOCKET) * mc), (size_t)mc, (size_t)mc };
+// memset(clients.data, INVALID_SOCKET, sizeof(SOCKET)*mc);
+// while (true) {
+// while (num_connections < s->max_connections) {
+// int slot = pop(open_slots);
+// clients[slot] = accept(s->sock, NULL, NULL);
+// // TODO: More robust handling of bad client sockets
+// if (clients[slot] == INVALID_SOCKET) {
+// printf("Error at accept(): %d\n", WSAGetLastError());
+// stop_server(*s);
+// return;
+// }
+// _start_conn_loop(clients[slot]);
+// }
+// }
+//}
void _start_conn_loop(SOCKET client_s) {