LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 06-13-2012, 07:15 PM   #1
mahkoe
LQ Newbie
 
Registered: Oct 2011
Posts: 25

Rep: Reputation: Disabled
Getting started with opengl in c++ in linux


I've been doing c++ for a while, and I've decided to get into opengl. The thing is, I don't have a clue where to start, what libraries to download, a linux-specific opengl tutorial (because all the example code I've tried to compile calls libraries I don't have). Anyway, I've hit a bit of a wall and I don't know where to go from here. Can someone point me in the right direction?

Many thanks
 
Old 06-14-2012, 12:11 PM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,765
Blog Entries: 4

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
Often when a Linux system is loaded it has only certain things that are needed but most things can be added. This is particularly true of many development libraries. Often enough there will be a <package> for running things and an additional <package>-devel" that includes libraries that allow you to develop applications (i.e. compile things yourself). Rather than abandoning the code you're trying you should try to see what packages provides the missing libraries.

Package management is different on different Linux distributions. For RedHat derivice distributions, rpm is used for individual packages and yum is used for installing packages while resolving dependencies. Other distros have other tools such as apt-get for Debian based or yast for others. Some distros even expect you to download and install the source bundles for everything and compile them yourself.

If you tell us what distribution and version you're using we may be able to tell you what tool you need to get missing packages and/or how to determine what packages you need based on the libraries you want.

Curious - why did you post this in Non-*NIX Forums? Clearly it IS Linux you're asking about.
 
Old 06-14-2012, 12:33 PM   #3
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 3,988

Rep: Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000Reputation: 1000
have you seen this?








__________________________________
Happy with solution ... mark as SOLVED
If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post.
 
Old 06-14-2012, 12:51 PM   #4
mahkoe
LQ Newbie
 
Registered: Oct 2011
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
If you tell us what distribution and version you're using we may be able to tell you what tool you need to get missing packages and/or how to determine what packages you need based on the libraries you want.

Curious - why did you post this in Non-*NIX Forums? Clearly it IS Linux you're asking about.

I'm sorry, I usually remember to mention my distribution. I am using ubuntu 12.04. This is in the non-nix forums because it was called the "programming" forum, I thought it would be the best choice.

@pan64 I have seen many tutorials, but this one uses windows
 
Old 06-14-2012, 01:19 PM   #5
pharaoh357
LQ Newbie
 
Registered: Jun 2012
Location: Leiria, Portugal
Distribution: Kubuntu and Gentoo
Posts: 8

Rep: Reputation: Disabled
Try search for mesa and freeglut.
 
Old 06-14-2012, 01:28 PM   #6
414N
Member
 
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 607

Rep: Reputation: 179Reputation: 179
Quote:
Originally Posted by pharaoh357 View Post
Try search for mesa and freeglut.
Mesa in an OpenGL implementation, which should not be specifically targeted during generic OpenGL development.
The OP needs to make sure he has a sane development environment ready (gcc, relevant header files in place etc.) before trying anything involving programming.
 
Old 06-14-2012, 10:34 PM   #7
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 2,307

Rep: Reputation: 767Reputation: 767Reputation: 767Reputation: 767Reputation: 767Reputation: 767Reputation: 767
I've been messing around with OpenGL a bit lately. I've mainly been following An intro to modern OpenGL, it's not really complete but it has enough to get you up and running with the shader pipeline rather than the obsolete fixed-function pipeline. There are some tutorials listed on opengl.org, but I haven't got around to looking at them yet.

Quote:
linux-specific opengl tutorial (because all the example code I've tried to compile calls libraries I don't have).
A lot of tutorials are based on freeglut which abstracts away all the boring platform specific stuff. If you don't have it, now would be a good time to learn how install development libraries.
 
Old 06-14-2012, 10:38 PM   #8
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,235

Rep: Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294Reputation: 1294
I recommend actually buying the OpenGL SuperBible. Having had no prior OpenGL or even 3D math knowledge, I read most of the fourth edition in one night, and subsequently got most of Alien Pong implemented during the remainder of the week. That's how great that book is.

For online resources, a good place to start is this thread:

http://stackoverflow.com/questions/3...ning-resources

Last edited by dugan; 06-14-2012 at 10:40 PM.
 
1 members found this post helpful.
  


Reply

Tags
c++, opengl


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No sound in KDE when started by startx while working fine when started by kdm/gdm arj1singh Ubuntu 2 12-14-2010 11:55 AM
Started nautilus as root....problems started Chaosbringer Suse/Novell 0 11-05-2008 03:00 AM
I want to get started with OpenGL in Suse JonBrant Programming 5 10-11-2006 10:20 PM
opengl/c++/linux getting started theeil Programming 5 02-01-2005 06:46 PM
getting started with Mesa/OpenGL wuck Programming 7 12-11-2003 04:29 PM


All times are GMT -5. The time now is 08:19 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration