• Advertisement
Sign in to follow this  

Nehe language

This topic is 3200 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement