GLFW
SDL
Our great sponsors
GLFW | SDL | |
---|---|---|
70 | 174 | |
10,668 | 5,736 | |
1.3% | 3.6% | |
8.3 | 9.9 | |
about 1 month ago | 5 days ago | |
C | C | |
zlib License | zlib License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
GLFW
-
OpenGL (GLFW and GLAD) not linking with cmake
There is a pattern to it which is usable with every GitHub repository. For example, GLFW v3.3.8 can be fetched from: https://github.com/glfw/glfw/archive/refs/tags/3.3.8.tar.gz
What exactly would I fetch with this method? He's fetching a raylib url, but I don't really see a pattern in it I can follow when fetching glfw. I assume I can use this repository? https://github.com/glfw/glfw
-
Curseforge Minecraft running on M2?
I'm not sure how to fix it, sorry. I searched for some of the messages and found this bug: . I think overriding the LWJGL library might fix the issue, but I don't see any way to do that with the CurseForge launcher.
- GLFW has merged proper support for client-side window decorations on Wayland!
-
Newbie questions about how to start
To go multiplatform with OpenGL / Vulkan (harder for a beginner) you can use a simple window library like GLFW and Dear ImGui for UI. I use these for Avoyd, along with a few other libraries.
-
CMake can't find GLEW
cmake_minimum_required(VERSION 3.16) project(P1_PR) add_executable(P1_PR src/main.cpp ) find_package(GLFW QUIET) if(NOT GLFW_FOUND) message(STATUS "GLFW not found, fetching from GitHub...") include(FetchContent) FETCHCONTENT_DECLARE( GLFW GIT_REPOSITORY https://github.com/glfw/glfw/ GIT_TAG 3.3.8 ) FetchContent_GetProperties(GLFW) if (NOT GLFW_POPULATED) set(FETCHCONTENT_QUIET NO) FetchContent_Populate(GLFW) set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) set(BUILD_GAMES OFF CACHE BOOL "" FORCE) add_subdirectory(${glfw_SOURCE_DIR} ${glfw_BINARY_DIR}) endif() endif() find_package(GLEW QUIET) if(NOT GLEW_FOUND) message(STATUS "GLEW not found, fetching from GitHub...") include(FetchContent) FETCHCONTENT_DECLARE( GLEW GIT_REPOSITORY https://github.com/Perlmint/glew-cmake GIT_TAG glew-cmake-2.2.0 ) FetchContent_GetProperties(GLEW) if (NOT GLEW_POPULATED) set(FETCHCONTENT_QUIET NO) FetchContent_Populate(GLEW) set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) set(BUILD_GAMES OFF CACHE BOOL "" FORCE) add_subdirectory(${glew_SOURCE_DIR} ${glew_BINARY_DIR}) endif() endif() target_include_directories(${PROJECT_NAME} PRIVATE ${GLFW_SOURCE_DIR} PRIVATE ${GLEW_SOURCE_DIR} ) target_link_libraries(${PROJECT_NAME} glfw glew32 opengl32 gdi32 glm ) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20)
- ayuda OpengL
-
Cursor scaling on Wayland is not there yet
I recently started following the Learn OpenGL tutorial and noticed that when I create a window with GLFW in the Wayland GNOME session the cursor becomes much larger when hovering over the window. This is because a Wayland client is expected to define its own pointer (cursor) and that seems to lead to inconsistencies between implementations. I do not have a problem with CSD being default on Wayland (I even prefer it when done really well, like Telegram Desktop, or any GTK app with GtkHeaderBar) but the cursor switching scale while moving it over surfaces (windows) is much more jarring.
- Ayuda con OpenGL
-
I have trouble creating window In Ubuntu
I recall an issue specific to Wayland where windows only appear after the first command buffer is submitted. https://github.com/glfw/glfw/issues/1398
SDL
-
How to run Diabotical on Linux
The relevant sdl2 commit, for science: https://github.com/libsdl-org/SDL/commit/711a458be5154063f2abdc3b9fb21670918e4bde
-
Cannot open file "SDL2.lib"
takes you here https://github.com/libsdl-org/SDL/releases/tag/release-2.26.5
Yes, thats what the line is saying to you. You can download pre compiled versions or build one from here https://github.com/libsdl-org/SDL. If you need that quite old version you will need to build it by your own. Or trying to find it somewhere else in the internet.
-
SOMA through HeroicLauncher not detecting Xbox Series S Controller (xpadneo installed, controller working for every steam game)
Yeah, the one linked is 2.0.5, which barely has the original Xbox One controller over USB support I believe. I think you need a way newer version of SDL: this commit only 5 years ago adds support for Bluetooth Xbox One controller: https://github.com/libsdl-org/SDL/commit/9ca5373024f3579e8b50c7c3c9ad74705033650f
- EmulationStation Desktop Edition (ES-DE) v2.0.1 is now available for download! This release adds an experimental theme downloader and some additional theme engine functionality. A number of bugs have also been fixed.
-
Help with setting up SDL2 to create a window in C from a video tutorial I was following.
For the SDL2 library I used this link: https://github.com/libsdl-org/SDL/releases/tag/release-2.26.5 and downloaded 'SDL2-devel-2.26.5-VC.zip'
-
Some people are waiting for Adventure mode, but I'm pretty impatient of SD2 and OSX/Linux releases
I don't know too much about the Steam Deck, but if it uses a Wayland compositor and DF runs, then it probably works because of Xwayland, which should be good enough for most people. SDL2 has Wayland support but it defaults to X if it's available. If people need a native Wayland application they should be able to just set an environment variable, although I'm not sure if you can do that through Steam.
-
Anyone able to get SDL2 working with C#?
Download, build the SDL2 native library (C/C++) and add the dll next to your executable. Note this can be automated using a postbuild command. Link here: (https://github.com/libsdl-org/SDL/releases/download/release-2.26.4/SDL2-devel-2.26.4-VC.zip)
-
Factorio gets official Wayland support on Linux
Most of games on Steam are using SDL2, so all you need is to set env var SDL_VIDEODRIVER=wayland, and those bundled with really old SDL2, you can easily load external SDL/system libraries (I've done it for years and Stardew Valley worked way smoother) https://github.com/libsdl-org/SDL/blob/main/docs/README-dynapi.md
-
Linker error with SDL2 and CMake
cmake_minimum_required(VERSION 3.16) project(P1_PC) add_executable(P1_PC src/main.cpp) find_package(Vulkan REQUIRED) if(NOT Vulkan_FOUND) message(FATAL_ERROR "Vulkan not found. Download at https://www.vulkan.org/") endif() find_package(SDL2 QUIET) if(NOT SDL2_FOUND) include(FetchContent) FETCHCONTENT_DECLARE( SDL2 GIT_REPOSITORY https://github.com/libsdl-org/SDL GIT_TAG release-2.26.3 ) FetchContent_GetProperties(SDL2) if (NOT sdl2_POPULATED) set(FETCHCONTENT_QUIET NO) FetchContent_Populate(SDL2) set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) set(BUILD_GAMES OFF CACHE BOOL "" FORCE) add_subdirectory(${sdl2_SOURCE_DIR} ${sdl2_BINARY_DIR}) endif() endif() target_include_directories(${PROJECT_NAME} PRIVATE ${Vulkan_INCLUDE_DIRS} PRIVATE ${SDL2_SOURCE_DIR}) target_link_libraries(${PROJECT_NAME} ${Vulkan_LIBRARIES} SDL2-static SDL2main SDL2) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20)
What are some alternatives?
bgfx - Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
glad - Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.
Skia - Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.
OpenSceneGraph - OpenSceneGraph git repository
Ogre 3D - scene-oriented, flexible 3D engine (C++, Python, C#, Java)
Open-Source Vulkan C++ API - Open-Source Vulkan C++ API
imgui - Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
gl4es - GL4ES is a OpenGL 2.1/1.5 to GL ES 2.0/1.1 translation library, with support for Pandora, ODroid, OrangePI, CHIP, Raspberry PI, Android, Emscripten and AmigaOS4.
volk - Meta loader for Vulkan API
DualSenseSupport - Preliminar DualSense
DirectXTK - The DirectX Tool Kit (aka DirectXTK) is a collection of helper classes for writing DirectX 11.x code in C++
raylib - A simple and easy-to-use library to enjoy videogames programming