View Full Version : openGL or C++ ?
ferum
2005.03.21, 08:30 PM
i am in the process of learning c and i was just wondering which languege i should learn next.
OpenGL is not a language, but rather an API (or set of functions which you use within the language).
kodex
2005.03.21, 09:22 PM
It really all depends on what you want to do with your code. C/C++ is a great base langauge and that is a good start. I would recommend toying around with some simple stuff with it for a while before taking on another leap. OpenGL is confusing enough when you are still having trouble with C.
OpenGL is a great step if you want to work with well pretty any kind of graphics these days. Pick up the redbook when you get there and read it cover to cover. It will give you a good foothold on what is to come. Remember start simple and small, dont overdue it, if you do you may become discourged with the whole thing.
Good Luck!
shaofaming
2005.03.22, 07:16 PM
I don't know ,but java may be your selection
i am in the process of learning c and i was just wondering which languege i should learn next.
shaofaming
2005.03.22, 07:17 PM
It's the first time for me to come here,
BinarySpike
2005.03.22, 08:02 PM
I.......must.......recomend.........NeHe........fo r.......OpenGL.........
(along with the redbook)......
Yes, I know I hate NeHe but everybody says it's the "new vibe" out today........
But, unless you have a well understanding of C don't even try API's....
I tryed Classic before I knew what return; was for, and.......Well, let's just say my head spun off.
But, hey, OpenGL rarely returns..... :wacko:
sealfin
2005.03.23, 06:11 AM
i am in the process of learning c and i was just wondering which languege i should learn next.
As usual, it depends on why you are learning that language, ie. what will you be trying to achieve in that language?
C is a decent enough language for game development (although I prefer C++ for it's OO elements, especially data hiding), and as Josh has already stated, OpenGL is an API, not an independent language, so there's no reason why you can't use OpenGL within your C code (or C++, or Objective-C, or etc.)
If you're looking to code games in C*, I'd suggest you take a look at the SDL (http://www.libsdl.org/) API, which handles window creation, event handling, etc. and allows for pretty easy cross-platform game development, and allows you to use OpenGL in conjunction with SDL
(*Or C++, and possibly Obj-C – anybody care to post whether you can call SDL from within Obj-C code? I'd suppose yes, but...)
Or if you're trying to code games for the web, you could always have a look at Processing (http://www.processing.org/), which shares a lot of syntax with C and C++.
(I'm presuming you're looking for languages suitable for game development, or you wouldn't be posting at iDevGames.)
sealfin
2005.03.23, 06:16 AM
Oh, and as BinarySpike suggested but didn't provide a link, there's a lot of OpenGL tutorials over at NeHe (http://nehe.gamedev.net/), usually with Mac ports (although most of the OS X ports are only available in Obj-C; if you'd like a few OS X/SDL ports in C/C++, there's a few such ports, a little buggy. up on my blog (http://blog.sealfin.com/index.php?p=5).)
ferum
2005.03.24, 07:43 AM
is openGL any easier with c++ knowledge?
kodex
2005.03.24, 09:00 AM
Yes an No, learning any additional langagues will give you more of a grasp when learning new things? Hell you could learn BASIC and it might help you better understand OpenGL. An Object-Oriented Langague would be a good way to work with OpenGL but it is by no means required. OpenGL can be called from just about anything.
It really depends on personal opinion.... Do you want to jump right into game dev and knock out some easy stuff with graphics and toy around? Or do you want to spend a few more months learning C/C++ and get a better grasp of the core programming? Both have their advantages and its really your call. Dont forget you can always go back and learn OpenGL later or Learn C++ Later. There is really no set order in which you need to do things.
Intro C++ may be easier for you to learn then intro OpenGL at this point but both can get rather complex when you get deep into them. Good Luck on whatever you deciede!
sealfin
2005.03.24, 09:02 AM
You'd probably find OpenGL easier with good knowledge of C...
OpenGL doesn't employ any of the object-oriented paradigms of C++*, so C++ knowledge isn't necessary.
(*lets skip the argument over whether C++ is really OO.)
ferum
2005.03.24, 04:05 PM
ok…decisions decisions… hmmmmm…i think i will do c++ and get a better grasp of the core programming
Puzzler183
2005.03.27, 10:27 PM
Well you have to learn C++ since OpenGL is just an API - a set of functions you can call from a C++ program.
arekkusu
2005.03.27, 10:36 PM
You have to learn C. C++ is optional.
sealfin
2005.03.28, 06:55 AM
OpenGL has bindings for a hell of a lot of languages; if you really wanted, you could be a masochist and learn Fortran...
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.