Getting started with OpenGL using 'C' (not C++)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tupacshakaur
    New Member
    • Jan 2018
    • 5

    Getting started with OpenGL using 'C' (not C++)

    Hi,

    First question, is it possible/useful to program OpenGL just with C and not C++? If it's possible, does it have severe limitations on what I can do? I have just finished a cource on C and would like to get things happening with OGL straight away instead of learning C++.
    In as little code as possible, what's the minimum I need to get a triangle rendered? I want to avoid all the setup of windows etc. Does GLUT work with plain C? Ideally, I'd like a 'hello world' program that draws a triangle instead of a text string. I've read the tutorials at NeHe and all the things about setting up windows is really too tedious.Should I be learning all the tedious stuff first or C++ before I take on learning OpenGL?

    I didn't find the right solution from the internet.
    Last edited by Rabbit; Feb 24 '18, 05:31 PM. Reason: link removed
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    C++ is just C with some add-on object-oriented features you are not required to use. C++ also has fixes for a ton of problems in C but diehard C programmers shun these fixes because they "lose control".

    Control isn't the issue. The issue is can this code be reused elsewhere. That Windows graphic set up is to save you years of coding to reinvent wheels that already exist.

    Reuse everything you can. The man that reuses gets his code to market sooner than one who doesn't puts the other man out of business.

    You have to decide what you will do with your programming. Application programmers need 1) an application, 2) programming skills, and 3) a code implementation. For example, if you want to work min finance, stop learning to code and get a CPA degree. Then get a job and use the language they are using.

    Learning to code is easy, takes about a year. Learning an application is not so easy.

    If you have coding skills and no application experience, you will have a hard time finding work.

    Comment

    Working...