Learning OpenGL 1 [closed]

夙愿已清 提交于 2020-08-05 19:15:22

问题


I am studying computer science since 3 semester and we just started with openGl 1.0. We are doing the very basics (math behind the api).

The lecture is structured in 4 parts and goes 4 semester.

Now I really want to read a book while I am hearing this lecture but I am not sure which one I should read.

Should I get a book for opengl 1 or opengl 3+ ?

Or should I wait until we start with opengl3 and read in the meantime a book about math , something like this?


回答1:


Nothing wrong with an older version of OpenGL for learning 3D graphics. The C programming language is 40 years old, Lisp even more, but they're still relevant. I do think it's important that you use at least OpenGL 1.3 or maybe 2.0/2.1 because, like most software, OpenGL 1.0 had some horrible bits that were quickly fixed in later versions.

With OpenGL 1.x or 2.x you'll learn the fundamentals of 3D graphics: polygon geometry, nested transformations, lights & materials, texture mapping. And they're easier to learn with OpenGL 1 or 2 than with 3 or 4, because there is a lot more built-in functionality in OpenGL 1/2 and many years worth of books and online tutorials for guidance.

Books to read: the "Red Book" OpenGL Programming Guide, preferably an older 3rd or 4th edition; or the OpenGL SuperBible, again a 2nd or 3rd edition. You could also look up the excellent NeHe web tutorials - for OpenGL 1/2 these are now called "legacy tutorials." For the maths behind 3D graphics, I'd recommend the 3D Math Primer for Graphics and Game Development by Dunn & Parberry.

What you don't get in OpenGL 1.x are shaders for modern GPUs. Once you've got the basics down, you can start with vertex and fragment shaders in OpenGL 2. And once you're comfortable with those, start programming for OpenGL 4. (I recommend skipping over 3 and going straight to OpenGL 4 / DirectX 11.)

This is assuming you want to learn from the top down, starting with built-in API functions that do most of the work for you and gradually going into more detail. If instead you'd rather dive in to the deep end, you want the OpenGL SuperBible 5th edition and a modern GPU with OpenGL 4. This is not the approach I prefer because IMHO OpenGL 3/4 are "3D assembly languages" and the learning curve is very steep, but some people do prefer it.

Hope this helps.




回答2:


OpenGL-1.0 – wow that's over 20 years old. Or do you mean OpenGL-1.1, still over 15 years old. Anyway, please tell your professor or teaching assistant to teach something usefull in the future; you're probably not in a computer graphics palentology course.

You should definitely learn OpenGL-3 and further. Version 3 did introduce long overdue API cleanups and the requirement of having to use shaders for everything makes things easier in the long run, actually.



来源:https://stackoverflow.com/questions/13791268/learning-opengl-1

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!