Handmade Hero»Forums»Code
107 posts
Win32 api or glfw?
Edited by C_Worm on Reason: Initial post
If i know enough about the win32 api to create myself a window and getting a valid HWND,
Is it enough to just use glew for loading the OpenGL functions or is it a good Idea to use glfw
for ”creating a valid context”?

it feels like i have more control when i create my own window using the win32 api but im a bit afraid that im missing out on something that glfw provides that i dont’t know of!
Marc Costa
65 posts
Win32 api or glfw?
GLFW creates windows, handles input, manages multiple monitors, initializes different OpenGL implementations and even Vulkan, so it's a library that provides different functionality for different platforms.

GLFW uses the Win32 API underneath on Windows, so everything GLFW gives you it's attainable by using Win32 alone.

It's your decision whether to go the Win32 route or the library route. Do you want to have full control on the platform layer? Use Win32. Do you prefer working on graphics and OpenGL and don't care that much about how you get a window, context and the input? Use GLFW to get started. You can always switch to Win32 in the future.
107 posts
Win32 api or glfw?
Allright big Thanks !!