I have a testing project set up for bgfx, which I was trying to learn. Problem is, i can't get GLFW to initialize properly.
The code snippet currently existing is this:
#include <bgfx/bgfx.h>
#include <GLFW/glfw3.h>
#include <iostream>
#define WINDOW_WIDTH 1920
#define WINDOW_HEIGHT 1080
int main(int argc, char const *argv[])
{
std::cout << "Initializing GLFW\n";
glfwInit();
std::cout << "Creating window\n";
GLFWwindow *window = glfwCreateWindow(WINDOW_WIDTH, WINDOW_HEIGHT, "Hello World", NULL, NULL);
std::cout << "Initializing bgfx\n";
bgfx::init();
std::cout << "Exiting" << std::endl;
return 0;
}
The console execution is this:
cmake . && make && valgrind --leak-check=full --log-file="yay.log" ./BGFX_Testing
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/entropy/CLionProjects/BGFX_Testing
[ 50%] Building CXX object CMakeFiles/BGFX_Testing.dir/main.cpp.o
[100%] Linking CXX executable BGFX_Testing
[100%] Built target BGFX_Testing
Initializing GLFW
libdecor-gtk-WARNING: Failed to initialize GTK
Failed to load plugin 'libdecor-gtk.so': failed to init
Creating window
Initializing bgfx
Exiting
Notes: If needed i can provide the CMakeList.txt and the valgrind yay.log (1055) The only question I have found with a similar issue is this, which has no verified answer, one answer that seems useful, which didn't change my problem.
OS Info: Kernel: 6.6.34-1-MANJARO CPU: AMD Ryzen 7 5700X (16) @ 3.400GHz GPU: AMD ATI Radeon RX6700XT
I'd appreciate any (reasonable) Idea on what i could do to solve this issue. Thanks.
Things I have tried already:
Checking libdecor installation
sudo pacman -S libdecor
Checking libdecor dependencies
ldd /usr/lib/libdecor-gtk.so
(all installed)Installing GLFW-X11 and -Wayland (Each alone or both at once, didn't change the issue)
sudo pacman -S glfw-x11
sudo pacman -S glfw-wayland
Sleeping over it