LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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
  Search this Thread
Old 04-17-2004, 10:03 AM   #1
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Rep: Reputation: 31
OpenGL programming


Hi, guys. I need to learn OpenGL programming because my boss wants me to.
For your information, I dun have any idea about 3D graphics programming.

I have been looking around on the Internet, mostly opengl.org and found some basic
ideas about this. And I oso found a tutorial on OpenGL programming available free on
opengl.org. But my problem is that, I dunno how to set up a good OpenGL programming
environment on my box. Below is the configuration of my computer:

Athlon XP 1800+
512Mb RAM
40Gb + 80Gb HDD
NVIDIA GeForce 2 Ti 64Mb
Slackware 9.1 full installation

Could anyone please give me a simple guide on what I need to do OpenGL programming.
I know there are Mesa, GLUT, nvidia driver, dri, glx, etc. But do I need them all?

Thanks.
 
Old 04-17-2004, 01:23 PM   #2
meisjohn
LQ Newbie
 
Registered: Dec 2003
Posts: 9

Rep: Reputation: 0
RE: OpenGL

A great site to check out is http://nehe.gamedev.net/.

As far as add-ons, I'm not much help there. The only thing that I would suggest is GLUT. I haven't really spent a whole lot of time with the other add-ons. I think the GLX libraries are helpful, but I haven't really spent a lot of time with them either.

I'm not really one for Development Environments. I'm more of a xemacs type of person. That's what I do most of my gl coding in; though it may not be the easiest environment for a beginner, I like it that way.


Good Luck.
 
Old 04-17-2004, 01:53 PM   #3
Boogle
LQ Newbie
 
Registered: Mar 2004
Distribution: Gentoo
Posts: 3

Rep: Reputation: 0
If dealing with Linux then I *highly* recommend getting to grips with SDL. Basically SDL wraps up all the OpenGL contexts, window setup and other things that are generally the same every single time you start a new project. SDL is also essential if you want to make a cross-platform project. More info: www.libsdl.org

You might also want to check out GLUT, but its not as advanced, and imo more messy involving callbacks and the like. GLUT is also cross-platform.

If this is your first forays into anything 3D, then be prepared for a LOT of work (unless of course you have done Maths to a fairly high level). I would definately recommend getting 'OpenGL Game Programming' by Kevin Hawkins and Dave Astle. They are the founders of GameDev, and their book is an excellent intro to 3D. You may also want to get a 3D maths book like '3D Math Primer' by Fletcher Dunn and Ian Parberry. Those should get you started with OpenGL and 3D maths.

If your boss thinks that a single person could make the next Quake or something, then hes very much mistaken. A single coder can make a fairly good 3D app, but it takes a long time. And if you're just learning 3D, then you will take quite a while to get anywhere useful. Be prepared to make a lot of mistakes on the rocky road of 3D development. Of course, 3D dev is also incrediblly rewarding and great fun.

In Windows I always use Visual Studio because it is an absolutely wonderful IDE with an excellent debugger (imo). I haven't coded much in Linux (yet), altho my latest app is cross-platform Windows and Linux. In Linux you could try KDevelop (using the QMake source management), and MinGW Studio. Anjuta is also pretty good, altho KDevelop is much better imo. I found using Gentoo quite helpful during development because you know exactly what you have installed, and where it is.

As meisjohn said, definately check out NeHe. The tutorials on there could replace the 'OpenGL Game Programming' book. Depends on your learning style. When I first learn something major I like to have a book for quick reference. They are generally easier to follow and more thought-out. Also check out www.gametutorials.com, they have some pretty sweet stuff that makes some concepts deceptively easy. Oh and check out http://www.ultimategameprogramming.com they have some pretty good tutorials, altho I generally prefer NeHe and Game Tutorials.

Good Luck!

Edit: A library to watch out for is GLaux. iirc its a non-standard library that isn't always available. NeHe can often use it in the early tutorials which is fine, just know that its best not to use glaux.

Last edited by Boogle; 04-17-2004 at 01:56 PM.
 
Old 04-17-2004, 05:57 PM   #4
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Original Poster
Rep: Reputation: 31
Thanks you guys for your excellent and worthy replies!

I know it will be difficult coz my Math is not very good.... and I will need a lot of time to be able to even start coding... but I will try my best at it

And no... my boss doesnt want me to develope a game or anything greater than that alone... it is just a small company and I am just working part-time there... they need somebody who are able to write Cg(C for graphics, http://developer.nvidia.com/page/cg_main.html) shaders(http://www.cgshaders.org/). And I found that will be impossible for me if I have no idea at all about OpenGL. Perhaps I should suggest to them to find someone who is more capable and experienced in 3D graphics. But anyway, I will try to learn by myself and see if I could possibly be a genius in 3D graphics.... (with a max possibility of 0.00000000000001 %) :P
 
Old 04-17-2004, 06:03 PM   #5
Boogle
LQ Newbie
 
Registered: Mar 2004
Distribution: Gentoo
Posts: 3

Rep: Reputation: 0
Haven't tried Cg myself, but I'm pretty sure that its 100% maths Involves modifying values at runtime based on rules.

Don't see any reason why you couldn't become very skilled with it all Just takes time and patience. You could try DirectX once you have got your hands dirty with OpenGL. The reason why I recommend DirectX is because it has a Debug library (if u install the SDK, a new DX control panel will appear in control panel). The debug library will output any issues with the 3D side of things to the output window in Visual Studio. I would think it would make work with shaders somewhat easier.

Definately start with OpenGL tho, far far FAR easier

Good luck The people at the Gamdev forums are usually very helpful if you have a problem. But be prepared for 'driver glitch' every so often
 
Old 04-18-2004, 08:23 AM   #6
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Original Poster
Rep: Reputation: 31
Thanks Boogle. I will consider your suggestion about Direct X.
And I just noticed that you only have a total of 3 posts but you had contributed 2 to my questions!!! How lucky I am.

Will ask again when I have questions on my long long way...

Thanks again.
 
Old 04-21-2004, 04:56 AM   #7
marmarchi
LQ Newbie
 
Registered: Feb 2004
Posts: 5

Rep: Reputation: 0
I have done my B.Sc. thesis with OpenGL.
first I got confused like you.
I think the best source is MSDN(MicroSoft Developers Network). there u can find all basic things for running a simple OpenGL application.
I remember that a guy named 'masoud samimi' had put good --OpenGL samples-- in the Internet. they were very helpful for start.
Good Luck
 
Old 04-21-2004, 07:10 AM   #8
dakensta
Member
 
Registered: Jun 2003
Location: SEUK
Distribution: Debian & OS X
Posts: 194

Rep: Reputation: 35
Ask your boss to get a copy of "OpenGL Programming Guide: The Official Guide to Learning OpenGL" written by the OpenGL Architecture Review Board.

Older versions are online ( http://fly.cc.fer.hr/~unreal/theredbook/ ) but it has evolved since then.

You might want to partner this with "OpenGL Reference Manual", again older versions being available on the internet ( http://www.mevis.de/~uwe/opengl/opengl.html )

 
Old 04-22-2004, 04:14 AM   #9
cjp
Member
 
Registered: Dec 2003
Location: the Netherlands
Distribution: SuSE 9.0
Posts: 54

Rep: Reputation: 15
No DirectX

Actually I don't understand how it is possible that people on a Linux forum recommend directx, as that library is only available on the windows platform, and m$ doesn't have plans to make it multi-platform.

Compared for performance and possibilities, direct3d and openGL are comparable, but openGL is easier to use. Also, as mentioned before, openGL is multi-platform. I have some experience with openGL, but I have to admit that I don't have experience with direct3D. I got this comparison from an article I found on the web. I'll post the link as soon as I find it again.

BTW I don't want to start a direct3d/openGL flame war. There are enough of them on the web, just use google if you want to see one. I just found it weird to see a directx recommendation on this forum.
 
Old 04-22-2004, 04:27 AM   #10
cjp
Member
 
Registered: Dec 2003
Location: the Netherlands
Distribution: SuSE 9.0
Posts: 54

Rep: Reputation: 15
The article

This is the article:
http://www.gamedev.net/reference/art...rticle1775.asp

If you are going to use openGL, then you also need to choose a library for the window management. I would not recommend GLX, as it is too low-level for beginners and it's not really portable to e.g. windows. GLUT is useful for learning openGL, but for nothing more. SDL is as easy as GLUT, but it has more features, which makes SDL very useful for game programming.
 
Old 04-22-2004, 07:28 PM   #11
Armand
Member
 
Registered: Jun 2003
Location: albuquerque, new mexico
Distribution: Windows XP, Debian Linux
Posts: 34

Rep: Reputation: 15
try "open gl for dummies"?
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
opengl programming in Mandrake 10.1 vivinuthappa Programming 2 08-12-2005 06:11 AM
opengl programming question jacksmash Programming 1 11-13-2004 07:54 PM
programming opengl redhat9 sopor Linux - Newbie 3 11-13-2004 12:05 AM
OpenGL programming help TheGr81 Linux - General 1 10-02-2003 03:55 PM
OpenGL Programming Question EviLBoX Programming 2 10-18-2002 11:29 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:01 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration