4 ms·
This is definitely the best way to start. Getting a windowing library operating properly is a struggle in itself, and can be very demotivating. OpenGL is compli
by Klinky 11y ago
This is definitely the best way to start. Getting a windowing library operating properly is a struggle in itself, and can be very demotivating. OpenGL is complicated enough without dealing with such thing. When I was researching it a lot back in 2010/2011, the answers were "don't use GLUT or SDL" since they were both not being updated at the time, so then the question was "what do I use?" and there didn't seem to be a good answer in C++ space. It looks like SDL is being updated again now though.
- santaclaus 11y agoWhy not Qt5?
- vetinari 11y agoBecause that's another huge framework in itself, that you would have to learn. When you are going to learn one thing, you don't make a detour learning another thing for a few months.
- slavik81 11y agoI don't know about then, but now there's a lot of choices. FreeGLUT, SDL, GLFW, SFML... It doesn't seem to matter all that much which one you choose, either.
- bjwbell 11y agoEach of them has advantages and disadvantages. Want to change the pointer using GLFW to one of the standard X11 pointers like the busy hour glass. Good luck, it can't be done as far as I know.
- maccard 11y ago> Getting a windowing library operating properly is a struggle in itself, What's so difficult about linking against a lib/including some headers and pasting the code snippets? The only part I really had problems with was figuring out that I needed glew, and why it wouldn't work on osx with the core profile .
- moron4hire 11y agoBecause most of the code snippets available online that one might paste are wrong and if you don't learn the fundamentals, you won't understand how and why they are wrong. But if you do understand the fundamentals, you won't need to paste a snippet. I haven't looked recently, but at one point I did a survey of rotation matrix examples online and the vast majority of them were wrong, with subtle typographic errors in a sign on a term here, or a cosine swapped with a sine operation there. I've seen "game rendering loop"s that leak memory every frame (in C++) or allocate every frame and eventually cause GC (Java, C#, JavaScript). I've seen OpenGL initialization snippets that didn't account for pixel density of the display properly and ended up rendering at too low of a resolution. No, don't paste snippets of anything you find online. It's likely to be really bad.
- yoklov 11y ago> didn't account for pixel density of the display You can easily tank the framerate if you account for this. At best, it should be an option in the video settings (if you're going to have them).
- moron4hire 11y agoI situation you will be quite a lot more prepared to handle if you study the fundamentals and not just copy-pasta so-called "boilerplate" code.