You are not logged in.

#1 2010-04-26 02:05:53

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

[SOLVED] OpenGL - How?

Ok, this is probably the stupidest question I have ever asked:
I am interested in game development with C++ and OpenGL. However, I have no F-ing idea what I am supposed to download to get started. I searched both the Official Repos and the AUR and didn't find anything. Basically I want to get up and running with C++/OpenGL as easy as possible, but I have had trouble finding anything good. The page on the Wiki is completely useless on what to do.

Thanks cool

EDIT: I hope Multimedia and Games is the right section to put this in tongue

Last edited by cesura (2010-05-04 23:42:26)

Offline

#2 2010-04-26 02:09:00

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,385
Website

Re: [SOLVED] OpenGL - How?

Google....

http://www.cprogramming.com/tutorial/op … ction.html - first hit...

Edit:  this looks good.   Just click on the text versions:
http://www.videotutorialsrock.com/index.php

Offline

#3 2010-04-26 02:11:48

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED] OpenGL - How?

Next page...

"Introduction to Windows Programming"

http://www.cprogramming.com/tutorial/op … mming.html

Last edited by cesura (2010-04-26 02:16:27)

Offline

#4 2010-04-26 02:16:32

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,385
Website

Re: [SOLVED] OpenGL - How?

Well... you never said you wanted to do it on Linux tongue

Offline

#5 2010-04-26 02:18:25

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED] OpenGL - How?

Allan wrote:

Well... you never said you wanted to do it on Linux tongue

Ahh, you got me there big_smile

Offline

#6 2010-04-26 02:25:14

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: [SOLVED] OpenGL - How?

I eased into it using Qt.  Everything you need is in there.  The nice thing is you can easily build Qt application infrastructure around a GL widget making learning, development and debugging easy.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2010-04-26 02:27:55

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED] OpenGL - How?

This:
http://www.videotutorialsrock.com/openg … x/text.php

states:

...the freeglut3-dev and mesa-common-dev packages provide these files

Those packages in Arch would be freeglut and mesa, as it seems to be installed. I'll do some test programs and see how it goes

ewaller wrote:

I eased into it using Qt.  Everything you need is in there.  The nice thing is you can easily build Qt application infrastructure around a GL widget making learning, development and debugging easy.

I don't like Qt because of the license

Last edited by cesura (2010-04-26 02:29:15)

Offline

#8 2010-04-26 02:48:06

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED] OpenGL - How?

Ok, it seems to be installed, but trying to make the first example on the page (cube) returns:

g++ -Wall -o cube main.cpp imageloader.cpp -lglut
imageloader.cpp: In function 'Image* loadBMP(const char*)':
imageloader.cpp:141:2: warning: suggest parentheses around '&&' within '||'
/tmp/cc8UDlVv.o: In function `handleResize(int, int)':
main.cpp:(.text+0x183): undefined reference to `gluPerspective'
collect2: ld returned 1 exit status
make: *** [cube] Error 1

I tried the solutions in this thread to no avail:
http://bbs.archlinux.org/viewtopic.php?id=91281

Offline

#9 2010-04-26 02:53:46

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,385
Website

Re: [SOLVED] OpenGL - How?

itsbrad212 wrote:

Ok, it seems to be installed, but trying to make the first example on the page (cube) returns:

g++ -Wall -o cube main.cpp imageloader.cpp -lglut

So -lGLU did not work?   Try -lGL as well.


Edit:

g++ -Wall -o basicshapes main.cpp -lGLU -lglut

Offline

#10 2010-04-26 03:00:36

Kiwi
Member
Registered: 2008-02-24
Posts: 153

Re: [SOLVED] OpenGL - How?

Slightly not what you are asking about, but... http://nehe.gamedev.net/ has some pretty good tutorials if you have not found it yet.

Offline

#11 2010-04-26 03:01:41

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED] OpenGL - How?

Kiwi wrote:

Slightly not what you are asking about, but... http://nehe.gamedev.net/ has some pretty good tutorials if you have not found it yet.

Thanks! I'll take a look once I can get this working cool

EDIT: For now, I'll screw around in blender and see what I can do there big_smile

Last edited by cesura (2010-04-26 03:11:06)

Offline

#12 2010-04-27 16:53:39

Watermel0n
Member
Registered: 2010-03-10
Posts: 60

Re: [SOLVED] OpenGL - How?

There is a huge problem with OpenGL development right now.
The current OpenGL Version is 4.0, but you can only find tutorials/resources for 2.0. They changed huge parts of OpenGL in 2.1 so if you want to learn the current OpenGL, you have to wait a few more months until more documentation is available. Many libraries, like SDL and Qt don't support the current OpenGL version in their stable releases, only deprecated versions.

Offline

#13 2010-04-27 20:57:06

bremarv
Member
Registered: 2010-03-12
Posts: 26

Re: [SOLVED] OpenGL - How?

Watermel0n wrote:

There is a huge problem with OpenGL development right now.
The current OpenGL Version is 4.0, but you can only find tutorials/resources for 2.0. They changed huge parts of OpenGL in 2.1 so if you want to learn the current OpenGL, you have to wait a few more months until more documentation is available. Many libraries, like SDL and Qt don't support the current OpenGL version in their stable releases, only deprecated versions.

using opengl 2 should be enough if one wants to learn opengl. As for libraries, the SDL version that supports opengl 3.x works fine for me, but if it should not work the stable version of freeglut works with opengl 3.


"As a former philosophy major, it disturbs me to think that things disappear when no one is looking at them, but that's exactly what happens in Python" - Mark Pilgrim

Offline

#14 2010-05-04 02:04:27

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED] OpenGL - How?

I keep receiving this error with the linker:

g++ -Wall -o basicshapes main.cpp -lglut
/tmp/ccKxkrEZ.o: In function `handleResize(int, int)':
main.cpp:(.text+0x96): undefined reference to `gluPerspective'
collect2: ld returned 1 exit status
make: *** [basicshapes] Error 1

Offline

#15 2010-05-04 02:17:23

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] OpenGL - How?

Missing a linker flag. Add '-lGLU'

Offline

#16 2010-05-04 23:42:11

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED] OpenGL - How?

falconindy wrote:

Missing a linker flag. Add '-lGLU'

Success! Thank you big_smile

Offline

#17 2016-12-20 13:41:40

gablab
Member
Registered: 2016-12-20
Posts: 1

Re: [SOLVED] OpenGL - How?

Hi, I'm trying to install OpenGL, too. Could you resume all the steps you needed? Is installing mesa and freeglut sufficient?

Offline

#18 2016-12-20 13:54:44

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,845
Website

Re: [SOLVED] OpenGL - How?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB