News for hackers. Stuff that matters.
Re:Welcome to OpenGL by Klinky on Sunday June 21, 2015 @01:52AM (#9752364)
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.
Re:Welcome to OpenGL by maccard on Sunday June 21, 2015 @08:11AM (#9753106)
> 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 .

Re:Welcome to OpenGL by moron4hire on Sunday June 21, 2015 @09:07AM (#9753258)
Because 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.

Re:Welcome to OpenGL by yoklov on Sunday June 21, 2015 @11:23AM (#9753744)
> 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).

Re:Welcome to OpenGL by moron4hire on Sunday June 21, 2015 @02:56PM (#9754510)
I 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.
Re:Welcome to OpenGL by slavik81 on Sunday June 21, 2015 @05:05AM (#9752734)
I 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.

Re:Welcome to OpenGL by bjwbell on Sunday June 21, 2015 @05:49AM (#9752803)
Each 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.

Re:Welcome to OpenGL by santaclaus on Sunday June 21, 2015 @03:11AM (#9752521)
Why not Qt5?
Re:Welcome to OpenGL by vetinari on Sunday June 21, 2015 @08:55AM (#9753227)
Because 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.