PDA

View Full Version : is There any OpenGL tutorial with C language??


Goomba
2007.07.15, 02:07 PM
I decided to read my C programming book, this time I am going to finish it. I already read Programming in Objective-C, but still am not an expert yet. But since Going back to reading about C, I am understanding a lot of concepts in Objective-C now that i didn't understand before.

So, I should have read the whole book on C before moving on to Objective-C! My intention was to program small games(2D), and then see if I can make bigger ones(3D). I bought all these books and one of them is Pangea's Ultimate game programming for Mac. The source code uses C, not Objective-C. And It recommends reading about OpenGL.

So, I was wondering is there a tutorial to show how to get started using OpenGL with the C language?? I only see Websites that have C++ tutorials with OpenGL:(

If anyone can help, I be very happy:D. I hope the joy you bring me is enough , because I am flat broke and cannot send any money!:cry:

wyrmmage
2007.07.15, 02:37 PM
I'm pretty sure that nehe.gamdev.net is all in C; admittably, it's geared more towards Windows, but you can still get the basics down.
-wyrmmage

Goomba
2007.07.15, 04:10 PM
Thanks, but I already checked that site and all the code is in c++ if I remember correctly. I checked sites like that, which are popular, but haven't found anything that is just C and OpenGL.

I am looking for books that may have OpenGl with C instead of C++. I found this book and at the time it was supposed to ship in July,now they changed it to October! It is for Mac OSX, so I thought the source code may be written in C http://www.amazon.com/OpenGL-Programming-Mac-Architecture-Performance/dp/0321356527/ref=sr_1_17/103-3708022-2650217?ie=UTF8&s=books&qid=1184526394&sr=1-17

If you know of books that would help, I would appreciate the link. I have 2 books on OpenGl, but they are for C++! I was going to learn C++ but changed my mind.

bronxbomber92
2007.07.15, 04:20 PM
OpenGL is all the same. Doesn't matter what language. C and C++ are so similar, that you should have no problem going from C++ to C.

Josh
2007.07.15, 05:14 PM
Why do you care much about C vs. C++? It really doesn't matter that much.

Goomba
2007.07.17, 03:12 PM
Well I care if it is C, because that is the language I am trying to master or at least be comfortable programming in. Then I move on to Objective-C, which I read a book already(Programming in Objective-C).

Reading the book on C I got (and going to finish this time), I am beginning to understand Objective-C better. So when I understand Objective-C more I will then be able to write Cocoa programs , games, etc.

I do not want get confused with going back to C and C++. Objective-C is a strict superset of C , what I understand, and I am not planning on learning C++.;)

Nevada
2007.07.17, 03:30 PM
Well, if the tutorials don't have any classes, there shouldn't be any problem with translating them. In fact, C has more lenient type checking so it might even be easier to compile some things in C. The only things I can see that need changing off the top of my head are the use of new() and delete(), which can be replaced by equivalent malloc() and dealloc() code, moving loop variable declarations outside for() statements, and using printf() instead of cout... Other than that, the two are indistinguishable if there are no classes. If there are, consider it a learning experience to turn them into structs...