noalias
01-05-2007, 02:43 AM
I have been doing a lot of searching on the internet in my spare time here during winter break before it's back off to college, and I decided to learn a little about Computer Graphics. In high school, I'd taken classes on HTML, JavaScript, and Java, but didn't get into C++, but I'm learning some now, so I decided to try to learn that along with using OpenGL. So I came across http://nehe.gamedev.net and decided I would start there.
Here's my problem, and it'd be really simple if I understood what I was doing, but I'm used to Java and how simple it is to compile: I can't follow their examples because I can't figure out how to impliment it with Xcode for the Mac. I have Xcode, and done the "Hello World" and that jazz... but that's using .cpp files. And then I go to try out their example, and after reading around on the net, find that I should use this "Carbon C++" Project type; at least I think I should. And I try that and it automatically creates 20 different files, with various extentions such as .app and .c (not .cpp, but it's called "main" so I guess it's where I will put my code in), and there's some frameworks added in. I figured out how to add in the GLUT framework which would logically be needed for the first tutorial (opening a window with OpenGL). I used their exact code, but still couldn't get it to compile; the only lines that didn't give me errors were the #define lines. So here are my questions:
1) Do I really need all those files? In Java, you just have the .java file (.c or .cpp), compile it, and it gives you your .class files (.app). Those are the equivelants, right?
2) I understand it may need frameworks included in the project, but is there some reason it wasn't recognizing the GLUT framework after I imported it?
3) Basically what I want to know is: What's the standard file format they're using in the tutorials at http://nehe.gamedev.net (.c? .cp? .cpp?)?
So that's basically what I'm wondering. Sorry it took so long to say, but I am getting frustrated and I keep going back to it with hopes that I'll figure it out, but I always wind up with more frustration. Thank you very much for your time and (hopefully) answers!
Here's my problem, and it'd be really simple if I understood what I was doing, but I'm used to Java and how simple it is to compile: I can't follow their examples because I can't figure out how to impliment it with Xcode for the Mac. I have Xcode, and done the "Hello World" and that jazz... but that's using .cpp files. And then I go to try out their example, and after reading around on the net, find that I should use this "Carbon C++" Project type; at least I think I should. And I try that and it automatically creates 20 different files, with various extentions such as .app and .c (not .cpp, but it's called "main" so I guess it's where I will put my code in), and there's some frameworks added in. I figured out how to add in the GLUT framework which would logically be needed for the first tutorial (opening a window with OpenGL). I used their exact code, but still couldn't get it to compile; the only lines that didn't give me errors were the #define lines. So here are my questions:
1) Do I really need all those files? In Java, you just have the .java file (.c or .cpp), compile it, and it gives you your .class files (.app). Those are the equivelants, right?
2) I understand it may need frameworks included in the project, but is there some reason it wasn't recognizing the GLUT framework after I imported it?
3) Basically what I want to know is: What's the standard file format they're using in the tutorials at http://nehe.gamedev.net (.c? .cp? .cpp?)?
So that's basically what I'm wondering. Sorry it took so long to say, but I am getting frustrated and I keep going back to it with hopes that I'll figure it out, but I always wind up with more frustration. Thank you very much for your time and (hopefully) answers!