View Full Version : New to linux
10-09-2009, 01:46 AM
I'm new to linux. How can i program in c++ and opengl in linux?
can anyone give me good web references or manuals?
My thanks in advanced
10-09-2009, 06:50 AM
For OpenGL apps with no or simple GUI, there will be little that you'll need to adapt to. The main difference from Windows is the level of hardware acceleration/driver support.
Actually, I had more trouble avoiding file path/name issues (case sensitive!) than anything else, though that's easy to get over that (and for the better, stick to Unix-like conventions when you can).
As far a IDE, I would recommend the following:
http://www.geany.org/ <-- very simple and minimal, or..
http://www.codeblocks.org/ <-- basic, with some advanced features
Never used these, but often recommended by others:
Of course, get them via your package manager (Synaptic if you're using Ubuntu).
You do your compiling with GCC. Most of the above IDEs set everything up when you install them and you don't have to worry much about makefiles.
As for coding, you use the same libraries you would on Windows. Use for simple window creation:
Likewise, use GLEW if you want to use more advanced OpenGL features such as shaders:
A good tip: If you're moving from Windows to Linux (or vice versa) anyway, it doesn't hurt to make your software cross platform and work on both. Very often this leads to better design, better code, and less bugs due to the different ways the platforms operate and different compilers. It doesn't take much effort at all, if you stick to it. Cross-platform is easy and fun!
For a more thorough reference, Google is your friend comrade.
10-10-2009, 03:36 PM
all true, and don't forget about propertiary drivers from ATI or NVIDIA (if You have their card).
They tend to support more features of modern graphic cards than open source drivers.
10-12-2009, 03:08 AM
So, supposing i want to create a game for both windows and linux. I should use one of the following?
10-12-2009, 05:00 AM
SDL is widely used for gl crossplateform opensource games.
10-15-2009, 06:51 AM
I'm reading about it and i'm liking it, but doesn't seem to me to have an extended documentation. Don't know if somewhere along a long project i don't get stuck without support, but thanks anyway. I guess as a rookie to opengl, i'll give it a try. This is for a game project, on my own, so it's a good chance to know sdl.
10-15-2009, 07:19 AM
SDL is a very mature and very well-supported library. It's used by several high profile games, so you won't go wrong with it. Moreover, it runs on most operating systems out there, which will help you port your project if you ever find a need to.
10-15-2009, 10:23 PM
... And there's the NetBeans IDE. Dunno if there's a C++ plugin but the one for Java is the bees knees.
MonoDevelop IDE for C# ...
Say, this would be a good section for the wiki... [shuffles some papers to look busy]
11-14-2009, 02:20 PM
I was about to ask the same question, although I have a slightly different requirement, as I need to integrate some OpenGL visualisation into a GUI.
So I guess I would have a GTK GUI from which I should be able to create an OpenGL window.
I have fairly good programming experience in Windows, but I'm pretty much a noob in Linux so I'm a bit confused by all the different possibilities that are out there and I'm not sure which one is the best.
Any help at that regard will be more than appreciated.
PS: on a side note, I tried Eclipse as an IDE and it's really easy to use, it took me less then 5 min to understand my way around it and make a simple project.
11-14-2009, 09:57 PM
Also the Linux Documentation Project is a great start, for all things Linux.
I'm just getting my feet wet with emacs, automake and auoconf, which is the old skool triumvirate in the Linux camp and might be of some interest to you in your cross platform efforts.
For the tinkerer the Gedit and Make IDE makes the perfect gift for the minimalist who has nothing. :-)
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.