News for hackers. Stuff that matters.
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.