Handmade Hero » Forums » Code » Win32 api or glfw?
18 posts
#21222 Win32 api or glfw?
2 weeks, 4 days ago Edited by C_Worm on July 4, 2019, 5:04 p.m. 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
42 posts
#21223 Win32 api or glfw?
2 weeks, 4 days ago

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.
18 posts
#21225 Win32 api or glfw?
2 weeks, 4 days ago

Allright big Thanks !!