Advertisement

Nehe language

Started by April 16, 2009 10:37 AM
3 comments, last by rip-off 15 years, 7 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
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.
Advertisement
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