🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Nehe language

Started by
3 comments, last by rip-off 15 years, 2 months ago
I have the NeHe opengl tutorials book seems pretty striaght forward but is written in C I know C++ and have little time so i keep stopping then restarting Is there anything in c++ I don't want to wade through c if i don't have to. Is there any other books you know of that teach opengl in C++ 3dmodeler
http://digitalart.f-sw.com
Advertisement
OpenGL is a C API. You can use it from C++ just fine. The only things 'convertible' to C++ about the Nehe examples will not be OpenGL-related at all, they'll be infrastructure-related like window setup or structures representing bitmaps, et cetera.
C++ is a close descendant of C, and all of NeHe's C tutorials will work just fine in C++.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

I'm a bit confused. You are saying that if i develop a c++ progam and lets say i want to add fog, i can just paste the c code from the NeHe book to my c++ program and it will compile? Maybe i am misunderstanding

3dmodeler
http://digitalart.f-sw.com
Most of the time, yes. Whether it will actually work the way you intended is a different matter, but that is more an argument against copy/pasting from poorly written tutorials than to do with the differences between C and C++.

C++ was designed to compile existing C code - without modification - as much as possible. Arguably, this was the secret to the success of the language.

This topic is closed to new replies.

Advertisement