Page 1 of 4 1234 LastLast
Results 1 to 10 of 37

Thread: I Want To Learn GL Should I Learn C++

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2002
    Location
    United Kingdom
    Posts
    3

    I Want To Learn GL Should I Learn C++

    I really want to learn GL ive used basic Pascal in the past, The big Q is, Is C++ still the main language used to code OpenGl Games etc or is there another Language, Any tips on the best route to take, Where to start, What software to use, Recommended Readings would be really helpful and appreciated. It is mainly game creation i am intersed in.
    SADIST

  2. #2
    Senior Member Regular Contributor
    Join Date
    Nov 2001
    Posts
    104

    Re: I Want To Learn GL Should I Learn C++

    Yes, C++ is in any case the best choice. I programmed for years now majorly with Delphi and only rarest in C++, but now after moving completely to C++ I'm very happy about that I finally did this step. I personally think Delphi/Pascal is far easier than C++, but latest, if you want to do anything professional or fast, you should take C++. Our last project was done with Delphi, 150,000 lines, but we detected unfortunately too late that Delphi is a one way street and ended with writing all of our time critical code in 100% assembler using SSE and 3dnow to even out the sucky Delphi compiler. So well... if you want to do it right, use C++ from the beginning on or you might be later very sorry about it.

    BlackJack

    p.s. You should stay away of the GLUT and GLU helper units. They save time and support dumbness, but if you ever want to port your engine or what ever you are going to do to DirectX you'll be very sorry then .

  3. #3
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Location
    Greece
    Posts
    477

    Re: I Want To Learn GL Should I Learn C++

    I feel like starting a flamewar so I have to say that you'd be better off with plain old C(and maybe some assembly later for optimizations).I can imagine how C++'s bloatedness and complexity(that is design-complexity not difficulty of use) can be overlooked in favour of the organization(classes and stuff) and the easier team programming in an equally big and bloated project(like those custom software ordered by organizations or the army),but for low-level programming such as graphics programming I can't see why one would use C++.Maybe just because the ++ and the fact that it's newer makes it sound 'better' thn old C.Or maybe because it's regarded as easier than C.Well easier doesn't always mean better,usually means worse.Maybe it's just a matter of taste...

    Let The Flames Begin...

    PS:If in fact you're not conquered by the dark side of the force and you do choose C.Get the book by Richie and Kerningham which covers all of c and is very small compared to some "Learn C++ in 666 days" monsters.You can easily read it two or three times in no time.Bear in mind thouh that it is a C manual not a programming manual.If you don't know much about programming you might want to do some some pascal tutorials and simple programms first to get the hang of it and then move on to C.You won't regret it.If this looks like a long procedure also bear in mind that you won't go far into graphics programming w/o patience.

    PS2 amn I love it when I talk like I know everything when in fact I learned C myself just 2.5 years ago.

    [This message has been edited by zen (edited 06-30-2002).]

  4. #4
    Junior Member Newbie
    Join Date
    Jun 2002
    Location
    Mission Hills CA
    Posts
    2

    Re: I Want To Learn GL Should I Learn C++

    In regards to the flame war respones id have to say go with C++ rathen C in the respect that when using API's such as OpenGL and DirectX 8.1 youll run into some case scenario where the API doesnt support the simple C format any longer and requires the use of a C++ class or method. if you have any more questions or need help learning the language contact me at DerrekMC@hotmail.com

  5. #5
    Junior Member Newbie
    Join Date
    Jun 2002
    Location
    United Kingdom
    Posts
    3

    Re: I Want To Learn GL Should I Learn C++

    Thanx all above, So i feel that C++ is the road to take (Sorry Zen....). Can any one recommend a compiler to start on. Is MS Visual C++ the best. Price dosnt matter just what ever one is easiest to get started on and is unrestricted in its features i suppose.
    SADIST

  6. #6
    Senior Member Regular Contributor
    Join Date
    Nov 2001
    Posts
    104

    Re: I Want To Learn GL Should I Learn C++

    Zen.... I personally would be very surprised, if C is faster than C++. Afer all C++ allows a lot more perverse constructions which are surely far better optimizeable than if you would write them into tons of single lines. And if your code is clean or not depends after all on you, not on the language. Same about teamwork.

    And if you want speed, well, in that case I use anyway pure assembler if even the optimizations the VC++ compiler does are still too bad.

    BlackJack

  7. #7
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Location
    Greece
    Posts
    477

    Re: I Want To Learn GL Should I Learn C++

    Hi Blackjack,
    I never reffered to speed as an advantage of C versus C++.Speed depends on the coder mostly.Even if some features of C++ are be slow you don't have to use them(or at least not in the inner loop).The fact that you don't write tons of single lines doesn't mean that the compiler doesn't do that for you.I think you will agree that the more low-level something is the more optimizable it is(for _all_ situations).That is because you have more freedom to do optimizations suited for your specific situation instead on relying on the compiler to do so who usually doesn't know anything about your specific situation.That is also why you resort to pure assembly to optimize what the compiler can't.This of course assumes that the programmer is capable of optimizing the code so,as I said,speeds depends on the coder and not the language.And besides the only thing that might make C++ a bit faster than _ANSI_ C is the inline statement but most C compilers have this feature anyway.Most other things like overloading etc. are just there to make the code more readable and to help the programmer.
    I also didn't say anything about the code you write.It can be clean or dirty in any language.I mentioned teamwork because OOP with classes etc. might make it easier to break up a very big and complex programm into smaller parts which can be then allocated among the available programmers.But as you said this mostly depends on the design of the application.What I said is that I like C because of it's design simplicity.It has everything that is needed to make everything you can do with just about any high-level language and only that.This gives you the most control of your code which,of course you can get with C++ if you don't use it's fancy features,but then C++ becomes C.
    Lucifer:I don't know about DirectX but opengl doesn't use classes or methods or anything OOP-related.This gives the programmer the freedom to choose wether his app will be OOP or not.If DX forces you to use OOP then it's DX that has the problem not C.

  8. #8
    Senior Member Regular Contributor
    Join Date
    Nov 2001
    Location
    Malaysia
    Posts
    135

    Re: I Want To Learn GL Should I Learn C++

    Learn C++, if you know C++, you'll surely know C. Operator overloading, inheritance, class, constructor and destructor, default parameter, polymorphism etc is enough to convice you to learn C++.

    ANYTHING JUST DON'T LEARN VB.

  9. #9
    Member Newbie
    Join Date
    May 2002
    Posts
    49

    Re: I Want To Learn GL Should I Learn C++

    Originally posted by Questions Burner:
    Learn C++, if you know C++, you'll surely know C. Operator overloading, inheritance, class, constructor and destructor, default parameter, polymorphism etc is enough to convice you to learn C++.
    That sounds as a good reason to NOT learn C++ as a first step in learning OpenGL. AFAICT, there ain't such thing as a C++ binding for OpenGL. And, of course, the above terms characterize object-oriented design approach, not C++, and are equally applicable to design's implementation in any (sensible) language. That is not to say C++ is bad, it is not, it is just a bit harder to create an efficient program in C++ IMHO, the extra care needed around not so apparent (copy) constructors, completely eliminates the convenience adavantage of the syntactic support (a.k.a sugar :P ) for OO concepts.


    ANYTHING JUST DON'T LEARN VB.
    I can only second that. Amen.

    Regards,
    -velco

  10. #10
    Senior Member Regular Contributor
    Join Date
    Apr 2001
    Location
    Greece
    Posts
    477

    Re: I Want To Learn GL Should I Learn C++

    I'll have to agree with velco.Also regarding VB sadist's initial question was wich language to learn.Since VB doesn't(IMHO) really qualify as a language it shouldn't be an option in the first place.So:
    ANYTHING JUST DON'T LEARN VB.
    I'll ...um third that

Page 1 of 4 1234 LastLast

Similar Threads

  1. What should I learn
    By DeamonDev in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-29-2014, 04:49 PM
  2. What shall I learn next?
    By firecracker in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-10-2012, 12:40 PM
  3. What should I learn?
    By programmer17 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-17-2012, 04:00 AM
  4. Best way to learn..
    By Mercalli in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 04-07-2001, 04:37 PM
  5. Learn from seeing
    By AU Student in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 02-07-2001, 01:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean