openGL or C++ ?

Member
Posts: 185
Joined: 2005.02
Post: #1
i am in the process of learning c and i was just wondering which languege i should learn next.
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #2
OpenGL is not a language, but rather an API (or set of functions which you use within the language).
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #3
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!

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
shaofaming
Unregistered
 
Post: #4
I don't know ,but java may be your selection
ferum Wrote:i am in the process of learning c and i was just wondering which languege i should learn next.
Quote this message in a reply
shaofaming
Unregistered
 
Post: #5
It's the first time for me to come here,
Quote this message in a reply
Member
Posts: 277
Joined: 2004.10
Post: #6
I.......must.......recomend.........NeHe........for.......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
Quote this message in a reply
Moderator
Posts: 697
Joined: 2002.04
Post: #7
Quote: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 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, 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.)

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
Moderator
Posts: 697
Joined: 2002.04
Post: #8
Oh, and as BinarySpike suggested but didn't provide a link, there's a lot of OpenGL tutorials over at NeHe, 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.)

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
Member
Posts: 185
Joined: 2005.02
Post: #9
is openGL any easier with c++ knowledge?
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #10
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!

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Moderator
Posts: 697
Joined: 2002.04
Post: #11
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.)

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
Member
Posts: 185
Joined: 2005.02
Post: #12
ok…decisions decisions… hmmmmm…i think i will do c++ and get a better grasp of the core programming
Quote this message in a reply
Puzzler183
Unregistered
 
Post: #13
Well you have to learn C++ since OpenGL is just an API - a set of functions you can call from a C++ program.
Quote this message in a reply
Sage
Posts: 1,232
Joined: 2002.10
Post: #14
You have to learn C. C++ is optional.
Quote this message in a reply
Moderator
Posts: 697
Joined: 2002.04
Post: #15
OpenGL has bindings for a hell of a lot of languages; if you really wanted, you could be a masochist and learn Fortran...

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
Post Reply