View Full Version : Starting 3d programming
DrKane
2002.08.30, 02:19 PM
I have been programming in 2d for about a year now and would like to move onto 3d. I would eventually like to learn openGL, but first I would like to have a grasp of 3d concepts in general. How is a practical way to start? And shuold I learn basics of 3d before starting to learn openGL?
Ian Kerr
2002.08.30, 02:30 PM
You're probably safe just jumping right into OpenGL. I would recommend getting the OpenGL Red Book if you do decide to learn OpenGL.
kainsin
2002.08.30, 02:43 PM
Try programming 2D in OpenGL first to get a feel for all the commands and such. Then look for online tutorials ( NeHe's ) to learn how to do some basic 3D things.
For more advanced topics and 3D techniques, you might want to start off with a good Matrix Algebra/Linear Algebra book. Or take a college class for those topics, if you can. Calculus 4 helped me a bit...at my college at least, that's where I learned Calculus topics for 3 dimensions, cylindrical and sphyrical coordinates and such.
DrKane
2002.08.30, 03:59 PM
Where do I get openGL?
zzajin
2002.08.30, 04:20 PM
OpenGL is a collection of functions based on an open standard. Your mac already has this plus some Apple specific extentions. I agree with the above comment.
nehe.gamedev.net is great place to start. Many of the tutorials have been ported to the mac.
zza
RigelPrime
2002.08.30, 06:57 PM
If you go to a good book store like Barnes and Noble or Borders, they should have some books that describe generic 3D concepts that aren't OpenGL specific. A couple that I found a bit useful are "Flights of Fantasy" by Christopher Lampton and "Black Art of Macintosh Game Programming" by Kevin Tieskoetter, both from Waite Group Press. The Waite Group puts out many excellent books, by the way. Also, unless you think you will be programming 3D for Windows (let's hope not!), then you can avoid Direct3D. If so, then it is almost mandatory. If you are doing Mac-only (I hope), then OpenGL is the way to go. OpenGL also works on Windows, but not as well as Direct3D. Direct3D is not supported by Apple.
henryj
2002.08.30, 08:21 PM
One of the best things about openGL and what made it so popular initially was that it is extremely easy to get stuff happening. For a beginner, and experts, that is really satisfying. You can't beat instant feedback:)
To start with you don't need any 3D knowledge to use openGL, but you should make the investment in the Red Book at least and maybe Real-Time Rendering by Moller & Haines.
It will be later when you are building a rendering pipeline that you will need to have a bit more knowledge in math, low level programming and 3D hardware, but this could be years down the track depending on how ambitious you are. At this stage the 20 minute Google degree will be your best resource.
DrKane
2002.08.30, 08:34 PM
I went to several book stores today looking for the red book that I'd heard about and couldn't find it. However I did find "OpenGL Game Programming" (made by the same company that made that Mac Game Programming book). I'm amazed at just how relatively simple most of the basic concepts apear to be. I've yet to start coding with it yet because when I dowloaded it from the apple developer web site, it said that I must be running OS 9.1 or lower and I am running 9.2. Where can I get it so that it runs with 9.2?
Iceman
2002.08.30, 10:00 PM
It's known as the OpenGL red book by almost every programmer but the real name is "OpenGL Programming Guide" (half of the cover is red & the publisher is Addison Wesley). Also there's the OpenGL blue book (it's more advanced) which I've never seen but I know that it's a lot smaller and it doesn't explain anything. Get the red book before anything else; I've heard a lot of horror stories about some of the other OpenGL books so be careful what you buy. Red book's got simple tutorials to the most advanced calls to OGL honestly this is the best and only book you should buy (besides the Big Nerd Ranch and Mark's Mac Game Programming book). The best place to buy a programming book is at bookpool.com they're books are way cheaper than anybody else (sometimes 50%). This is the only place I buy programming books online that's how good they are!
Hope this helps,
Iceman
DrKane
2002.08.30, 10:43 PM
Where can I download OpenGL that will work on OS 9.2?
OpenGL is installed with OS 9 (9.2 also) so you don't need to worry about that. What you are asking for is probably the OpenGL SDK for OS 9. You should be able to find it somewhere on Apple's OpenGL site. Go to http://gemma.apple.com/opengl/downloads.html
Looks like you might need an ADC membership to get it but the basic web membership is free. You just need to sign up.
KenD
DrKane
2002.08.31, 08:57 PM
Okay, I finally downloaded OpenGL SDK for os 9. I am confused about which headers and libraries to include and how exactly to include them. Do I just drag the libraries into my project or what? And do I even have to include the opengl headers and if so do i use " " or <>, I've seen them both done in seperate documentation.
Carlos Camacho
2002.09.01, 12:44 AM
We have a review planned for "OpenGL Game Programming."
Geert is also working on setting up a sub-domain to have all nehe tuturials posted with Mac code, etc.. Please search the forum and give him a hand.
Iceman
2002.09.01, 04:40 PM
Yeah I've also wondered about the difference between #import and #include. Check out the OpenGL Red book (check the internet I know there are some free online versions of it) for an indepth explanation for the different libraries and how to include them. You can find some of the best OpenGL Lessons at NeHe http://nehe.gamedev.net/
Iceman
OneSadCookie
2002.09.01, 06:21 PM
The OpenGL headers are "System" headers, so it's technically better to use angle brackets. I don't think any of the Mac compilers really care though.
#include simply copies the contents of the named file to the same place as the #include statement. #import ensures that a given file can only be included once. Using #import is equivalent to putting
#ifndef MY_HEADER_FILE_NAME
#define MY_HEADER_FILE_NAME
...
#endif
around each of your headers.
ghazban
2002.09.06, 02:00 AM
The nehe-tutorials doesn't seem to work in MacOS 10.2 if you do like they do in http://nehe.gamedev.net/tutorials/lesson.asp?l=MacOSX .
You can download a working port of it for the MacOSX that works, but it's not written using GLUT, and it's written in cocoa which I have yet to learn... can somebody help me on how to get started with GLUT and OpenGL in Jaguar?
ededed
2002.09.06, 02:47 PM
If you are using Cocoa (Mac OS X) here is some useful source code I made for Selection and Picking.
http://www.geocities.com/ed72678954/index.html
http://www.geocities.com/ed72678954/Cocoa-OpenGL.sit
You can download from index.html space goon with source code, it is a game I made that lets you bash spaceships into each other. It uses OpenGL and Cocoa frameworks but it is not Object Oriented because I coded it really badly yet it is still useful and easy to read.
The Cocoa-OpenGL.sit thing should go in developer/ProjectBuilderExtras/ProjectBuilderTemplates/Applications in with Cocoa-Application Cocoa-DocumentBased-Application and all that. Then In project builder you should be able to go new Project and make an Cocoa-OpenGL application really quickly.
Source code for space goon and a good ProjectBuilder template should help... right?
DJBlufire
2002.09.23, 01:10 PM
The link to the Cocoa-OpenGL template isn't working...
Feanor
2002.09.23, 04:04 PM
Originally posted by Iceman
It's known as the OpenGL red book by almost every programmer but the real name is "OpenGL Programming Guide" (half of the cover is red & the publisher is Addison Wesley). Also there's the OpenGL blue book (it's more advanced) which I've never seen but I know that it's a lot smaller and it doesn't explain anything. Get the red book before anything else;
The OpenGL Programming Guide is available online in a couple of places -- both are stuck at v1.1 (printed edition is v1.2, OpenGL itself just ratified v1.4), but still applicable and fine for beginners.
Red Book (http://fly.cc.fer.hr/~unreal/theredbook/)
The Blue Book is actually just a reference manual to all OpenGL functions and constants. If you are not on OS X yet, you might have a browse through gl.h and glu.h just to get a feel. SGI (the originator of OpenGL) has an ftp server full of OpenGL Documentation (ftp://ftp.sgi.com/sgi/opengl/doc/). The best thing on this page would be the openGL man pages, which come in a tar.Z format for unix unfortunately.
Also, check out the class notes from any university computer graphics course, such as those at Ryerson CPS511 (http://www.scs.ryerson.ca/~tmcinern/Courses/cps511.html). I just started this course three weeks ago.
--FÎanor
Babbler
2002.09.23, 04:28 PM
Originally posted by DJBlufire
The link to the Cocoa-OpenGL template isn't working...
Typical Geocities. *shrug* You'll need to cut and paste the URL so there isn't a referral sent to the server.
Jeff Binder
2002.09.23, 04:32 PM
OS X includes all of the GL man pages, as well. Just type 'man glClear' at the terminal, for example. These man pages are exactly the same thing that you get in the Blue book. Of course, the Blue book also includes some nice tables and a pull-out diagram :) .
Feanor
2002.09.23, 07:15 PM
Originally posted by Jeff Binder
OS X includes all of the GL man pages, as well. Just type 'man glClear' at the terminal, for example.
I neglected to mention that :). Unfortunately, the original poster is on Mac OS 9.2. -- FÎanor
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.