ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Recently I decided to add 3D graphics to my game (swarm.bentatman.co.uk, blog.bentatman.co.uk) to make the game more enjoyable, however I am not sure of anything to do with OpenGL. Are there any good tutorials about it?
Also, if you can, can you go to the (first) website and see if there are any other things I should add to the game, and, if indeed I should add graphics (see my blog post on the second website about graphics).
Recently I decided to add 3D graphics to my game (swarm.bentatman.co.uk, blog.bentatman.co.uk) to make the game more enjoyable, however I am not sure of anything to do with OpenGL.
Not a good idea, unless you have artists. It is your decision, though.
To use OpenGL on multiple platforms you'll need cross-platform library to initialize it - libsdl or Qt 4.
Please note that OpenGL/3d graphics is a HUGE subject whose difficulty is on par (or surpasses) C++ programming language. Also, there are multiple versions, and starting with version 3.0 OpenGL heavily concentrates on shaders, which is another huge topic.
To use OpenGL on multiple platforms you'll need cross-platform library to initialize it - libsdl or Qt 4.
Please note that OpenGL/3d graphics is a HUGE subject whose difficulty is on par (or surpasses) C++ programming language. Also, there are multiple versions, and starting with version 3.0 OpenGL heavily concentrates on shaders, which is another huge topic.
What I meant by that was because many of the tutorials I have found are C++ ones, so I was looking for one more centered around C.
There's no difference between using OpenGL in C++, C, Pascal, Python or any other language. API is the same regardless of language.
If you feel particularly adventurous, you could go to opengl.org and start reading specification for version 1.4 (anything newer than that will concentrate on shaders, which will induce massive headache for beginner), but that may be difficult.
Or you could start with either "red book" or "Computer Graphics using OpenGL".
There's no difference between using OpenGL in C++, C, Pascal, Python or any other language. API is the same regardless of language.
If you feel particularly adventurous, you could go to opengl.org and start reading specification for version 1.4 (anything newer than that will concentrate on shaders, which will induce massive headache for beginner), but that may be difficult.
Or you could start with either "red book" or "Computer Graphics using OpenGL".
Ah, ok. I am going to read through the openGL website, and see.
Check out Nehe's series of "legacy" tutorials, which are still current and accurate. They're written for OpenGL 2, so they still work perfectly:
Well, it doesn't quite work this way. OpenGL starting with version 3 introduced core and compatibility profile. "compatibility" profile is backwards compatible with OpenGL 2, but "core" profile is not (and it is shader-centric). Deprecated features that are not present in "core" profile include glVertex2f, entire fixed-function rendering pipeline (lighting) and all matrix functions - all those functions were heavily used in OpenGL 2. See OpenGL 3.2 specification appendix E. Modern hardware supports OpenGL 3 or 4.
Fortunately, libraries such as LibSDL provide "compatibility" profile by default.
Also NeHe (in addition to weird color scheme) has a bad habit of posting windows-only tutorials (for example, tutorial that uses wglUseFontOutlines), which pretty much defeats the point of using OpenGL.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.