Hacker News new | past | comments | ask | show | jobs | submit login

Thanks for disagreeing with style!

Even if a novice reader is not familiar with C at a very deep level, it's not that different from other programming languages. You should be able to read C and grasp the basic concepts of storing objects in memory, because a lot of OpenGL is about storing stuff in memory and you have to think about pointer alignments and stuff like that.

And besides, if you're writing example applications for a book or a tutorial, you should probably stick to very simple C code anyways. The kind that anyone can read to some degree.

Please note that I did not advocate that the reader must write their own projects using C, even if the book examples are in C. They can pick any other language they feel comfortable in. Just be prepared to deal with binding libraries and windowing toolkits and all the little things that you need.

Programming the GPU is one of the most hostile programming environments out there. You might not have a debugger available and you can't even debug with prints, you have to deal with memory explictly, drivers are buggy and a small mistake in your program might crash your computer partially or fully or cause very unintended consequences. I would not recommend for a novice who can't deal with C code to go there. This is true whether you use C or not. Even with WebGL.

Most of the people who want to learn OpenGL, actually want to learn 3d graphics programming. Then it's actually better to take a 3d engine that deals with 3d models, lights and cameras and stay away from OpenGL, which is basically a very complicated way of drawing triangles very fast.

A lot of stuff you said about C being difficult in practice, libs that are broken, difficulty on setting up on Windows, etc are true. However, they don't really apply to using it as a language in programming examples in a book or a tutorial.




> Most of the people who want to learn OpenGL, actually want to learn 3d graphics programming.

What 3D engines would you recommend? I've looked at OpenInventor and Coin3d briefly but I'm interested in solid modelling as well, rather than 'just' visualisation. I'm guessing there's no such thing as an well documented and easy to use open source equivalent of the Parasolid or ACIS kernels? :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: