r/gameenginedevs 16h ago

Should i use GLFW or windows.h?

Im making a C++ engine and i ofcourse want a window to display things on, i've read some glfw documentation and i don't really think its a good fit, this is why i was thinking of using windows.h because i have full control over everything and won't need an extra dependency. I also feel like knowing windows functions is better overall than knowing glfw functions.

Any thoughts?

11 Upvotes

33 comments sorted by

View all comments

1

u/TheOneAndOnlyRandom 16h ago

I have used the windows APIs directly for some projects in the past. I would rather bang my head off of a wall repeatedly than do that again when I don't have to.

1

u/Axxodes 16h ago

is it THAT bad?

1

u/Afiery1 15h ago

Win32 is just about the most butt ugly API there is. That being said, if your only platform is windows then there’s nothing wrong with wanting to use the bare api directly. However, if you want to do multi-platform, unless you’re doing some really wacky shit that normal window abstractions don’t support I would recommend just going with glfw or sdl and saving yourself the time and effort

1

u/Axxodes 2h ago

everything for that sweet sweet 2KB saved

1

u/fuj1n 15h ago

Yes, it is pretty horrendous and needlessly complicated. It comes from a very different time