Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Nehe language


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 3dmodeler   Members   -  Reputation: 101

Like
0Likes
Like

Posted 16 April 2009 - 04:37 AM

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

Sponsor:

#2 Josh Petrie   Moderators   -  Reputation: 3191

Like
0Likes
Like

Posted 16 April 2009 - 04:43 AM

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.

Josh Petrie | Game Developer, Undead Labs


#3 swiftcoder   Senior Moderators   -  Reputation: 10242

Like
0Likes
Like

Posted 16 April 2009 - 04:44 AM

C++ is a close descendant of C, and all of NeHe's C tutorials will work just fine in C++.

Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#4 3dmodeler   Members   -  Reputation: 101

Like
0Likes
Like

Posted 17 April 2009 - 04:11 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

#5 rip-off   Moderators   -  Reputation: 8527

Like
0Likes
Like

Posted 17 April 2009 - 04:15 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS