Category : glfw

I’m trying to run the example GLFW program on WSL2 with vcxsrv as the X server. There are no problems running the current program with the two lines commented out. When I uncomment only glCear(CL_COLOR_BUFFER_BIT);, it lags a bit when I drag the window around. When I uncomment only glfwSwapBuffers(window) the program crashes as soon ..

Read more

I’ve installed WSL2 on Windows 10 along with GLFW. When I try to run the default GLFW example program, I run into the following error X11: The DISPLAY environment variable is missing. I build the program using this command-line: g++ main.cpp -lglfw -lGL -o main Program: #include <stdio.h> #include <iostream> #include <GLFW/glfw3.h> static void glfwError(int ..

Read more

I am trying to render two textures, so I create them beforehand and later use them to render, but only the first one shows the texture I want, the second one becomes completely white. This is the code used to generate the texture: GLuint tex = 0; glGenTextures(1, &tex); glBindTexture(GL_TEXTURE_2D, tex); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, ..

Read more

I’ve tried to set the window icon from the scripts within the stackoverflow questions below, but nothing did work to my solution GLFW SetWindowIcon https://docs.microsoft.com/en-us/windows/win32/menurc/using-icons My entire main.cpp from my solution: #include "imgui/imgui.h" #include "imgui/imgui_impl_glfw.h" #include "imgui/imgui_impl_opengl3.h" #include <string> #include <iostream> #include <glad/glad.h> #include <GLFW/glfw3.h> #include <Windows.h> #include <WinUser.h> #include <WinNls32.h> int main() { // ..

Read more