By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,041 Members | 1,793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,041 IT Pros & Developers. It's quick & easy.

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

P: 5

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.
Feb 24 '18 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 9,197
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.
Feb 24 '18 #2

Post your reply

Sign in to post your reply or Sign up for a free account.