LinuxQuestions.org
Visit Jeremy's Blog.
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 01-30-2005, 08:36 AM   #1
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Rep: Reputation: 35
Need info about Linux graphics (e.g. OpenGL)


Need info about Linux graphics (e.g. OpenGL).
I'm complete dummy in cpp. I know only the basics. So I started learning it. But hell... it's so boring. That's why I ask you to provide me with the necessary info about how to draw anything. First I want to draw anything in X. I tried Qt, but I don't know how it makes GUI apps. It makes, but I want to know HOW, I'm not satisfied with "include this .h and you'll be able to". If you know documents wich can describe the graphics' basics, I'll be thankful for it. Also I want to know where to get OpenGL and how to work with it. Don't say to buy anything, I want free documentation.
Thanks in advance.
 
Old 01-30-2005, 08:58 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
Re: Need info about Linux graphics (e.g. OpenGL)

Quote:
Originally posted by kornerr
Need info about Linux graphics (e.g. OpenGL).
You could try these:
http://www.libsdl.org/tutorials.php

If an other programming language than C++ would be an option for you, you want to try python and use the additional graphics/game library called "pygame".

You can find quite a few python-tutorials overhere:
http://www.python.org/doc/Intros.html
http://www.python.org/moin/BeginnersGuide

And two tutorials for "pygame" are here:
http://sjbrown.ezide.com/games/writing-games.html
http://kai.vm.bytemark.co.uk/~piman/...tutorial.shtml

Quote:
I'm complete dummy in cpp. I know only the basics. So I started learning it. But hell... it's so boring.
If you really feel it's "boring", maybe you just shouldn't bother to learn programming at all...

Quote:
That's why I ask you to provide me with the necessary info about how to draw anything. First I want to draw anything in X. I tried Qt, but I don't know how it makes GUI apps. It makes, but I want to know HOW, I'm not satisfied with "include this .h and you'll be able to". If you know documents wich can describe the graphics' basics,
Try going through the Qt-tutorials. Try to understand how and why everything works. Experiment with the programs by changing things, and see what happens.
See:
http://doc.trolltech.com/3.3/how-to-learn-qt.html
http://doc.trolltech.com/3.3/tutorial.html
http://doc.trolltech.com/3.3/tutorial2.html

Quote:
Also I want to know where to get OpenGL and how to work with it. Don't say to buy anything, I want free documentation.
Try SDL (www.libsdl.org) as mentioned above. It has support for OpenGL. But Qt has as well (see http://doc.trolltech.com/3.3/opengl.html).
 
Old 01-30-2005, 09:06 AM   #3
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Original Poster
Rep: Reputation: 35
Hey, hey, I didn't say VERY boring - it's boring to learn smth new
______________
Looking your links now...
 
Old 01-30-2005, 12:11 PM   #4
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Original Poster
Rep: Reputation: 35
Hell! I found NO info for a noob. Functions, functions... no complete program. Isn't there any free step-by-step guide? Can I do drawing using only X, without any SDL, OpenGL? I see in this tutorials: include this .h and you'll get... Can you provide me with the necessary info on how to "work directly with X"? I'm about to read 'man X', howtos that came with my distro, but it seems to me it will be just 'blah, blah, blah' >(
 
Old 01-30-2005, 02:12 PM   #5
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
Quote:
Originally posted by kornerr
Hell! I found NO info for a noob. Functions, functions... no complete program. Isn't there any free step-by-step guide?

Can I do drawing using only X, without any SDL, OpenGL? I see in this tutorials: include this .h and you'll get...
The tutorial links I posted are step-by-step guides. The thing is, they assume you already know C or C++. So they assume you also know what it means to "include this .h", which is basic knowledge for C/C++ programming.

You said in your first post you started learning C++. So you do have some step-by-step guide about that I suppose. That's where a noob starts. When you have worked your way through those, you'll be able to understand what "include this .h" means, and to understand the Qt or libsdl tutorials.

Quote:
Can you provide me with the necessary info on how to "work directly with X"? I'm about to read 'man X', howtos that came with my distro, but it seems to me it will be just 'blah, blah, blah' >(
No, "man X" will only tell you about (advanced) usage and configuration of the Xwindow system, not about programming for X.

No, I really don't know any step-by-step guides about programming for X directly (i.e. without Qt, libsdl,...). For me, it's too difficult and too much hassle (I'm not joking here). Remember that things like Qt, GTK, SDL are invented mainly to make it easy to make programs for X.

If learning C or C++ is too "boring" for you, learning about Qt/GTK/libSDL will definately be even worse. Not to mention programming X directly...

Last edited by Hko; 01-30-2005 at 02:14 PM.
 
Old 01-30-2005, 02:16 PM   #6
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 31
You'll definitely want to learn C/C++ pretty well before you try and learn something like OpenGL.

And if you find learning boring, maybe programming isn't exactly for you. Learning new programming stuff is what keeps me excited about it. Learning is the fun part.
 
Old 01-30-2005, 02:59 PM   #7
deveraux83
Member
 
Registered: Jul 2003
Location: Malaysia
Distribution: Red Hat, Slackware 9.1
Posts: 76

Rep: Reputation: 15
I am also learning about OpenGL but I started about a year or two ago and do it on my free time and let me tell you, if you really want to learn OpenGL and create proper 3D programs, I would very heavily recommend you having at least moderate if not advanced knowledge of C/C++. (sorry for the extremely long sentence)

I used the articles available in http://nehe.gamedev.net/ and they have the appropriate ports to just Linux using glx and the linux port using SDL. If you are new, I highly recommend you start off with SDL as it is platform independent and can perform other functions, such as sound and inputs.

Good luck with OpenGL!

PS: Its really really fun once you get used to it.
 
Old 01-31-2005, 09:46 AM   #8
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Original Poster
Rep: Reputation: 35
All right, I follow your advice to learn clear cpp first. So here's my last request to you: may be you know any free interesting (exciting?) cpp book? Thanks.
 
Old 01-31-2005, 12:00 PM   #9
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
Quote:
Originally posted by kornerr
may be you know any free interesting (exciting?) cpp book?
Here's one:
http://www.mindview.net/Books/TICPP/...ngInCPP2e.html
 
Old 01-31-2005, 01:00 PM   #10
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Original Poster
Rep: Reputation: 35
Downloading for now... Thanks. I will post someday my opinion...
 
Old 08-12-2005, 01:28 PM   #11
kornerr
Member
 
Registered: Dec 2004
Location: Russia, Siberia, Kemerovo
Distribution: Slackware
Posts: 893

Original Poster
Rep: Reputation: 35
Just wanted to say that I'm reading the 10th Chapter of TICPP and it's great, but so far I don't use knowledge I learn from there... I'm afraid I'll forget them if I don't try to do anything.

So here's a stupid request (really sorry): do you know of any small cpp application that doesn't use GTK, QT or other unknown to my libs (so that I could understand how it works).

I've looked at fluxbox and gthumb... but they're to complicated for me now... and use much libs...

Thanks if there exist any answer to such a stupid question, heh
 
Old 08-12-2005, 04:24 PM   #12
lowpro2k3
Member
 
Registered: Oct 2003
Location: Canada
Distribution: Slackware
Posts: 340

Rep: Reputation: 30
Quote:
Originally posted by kornerr
All right, I follow your advice to learn clear cpp first. So here's my last request to you: may be you know any free interesting (exciting?) cpp book? Thanks.
I like "C++ Primer Plus" by Stephen Prata. Just keep focusing on learning more and more about C++, forget C for now (or vice versa). You should learn generally in this order if you're learning C++. Make a 'checklist' of things you've learned, so you can tell you're making progress:

1-3 weeks:
* Variables
* Expressions/conditionals (if statements, switch cases, etc...)
* Simple Input and Output (cin, cout)

1-3 weeks:
* Loops (for, while)
* Functions
* Arrays

2-4 weeks (learn pointers and review old stuff, try writing a few small programs after pointers):
* Pointers
* Strings (C style and C++ style)

2-3 weeks:
* Classes/Objects

2-3 weeks:
* Inheritance

1-3 weeks:
* Polymorphism
* Templates

2-6 weeks:
* Data Structures, STL


After going through all that, about 6 months to a year depending how much you program, start learning other API's (such as OpenGL, GTK, Win32, Network API's, etc...). Or you can go back and learn some topics for C that you won't learn in C++. You will learn alot about C though from learning all of C++.

And believe me, I know your pain about learning languages at the beginning. I really do find that programming gets more and more fun the better you get at it. Keep with it, it gets better

Last edited by lowpro2k3; 08-12-2005 at 04:27 PM.
 
  


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
Graphics Card problems with opengl pafinator11 Linux - Hardware 2 08-13-2005 02:09 PM
Integrated Intel 845GV graphics chip runs rather slowly with OpenGL EOHooligan Linux - Hardware 5 01-30-2005 10:23 AM
Many artifacts in unreal 2004 opengl+graphics card problem? brainlesspinkey Linux - Hardware 1 11-21-2004 10:22 PM
DELL Graphics Info (I fixed my problem) Assassin Linux - Hardware 9 02-14-2004 09:10 PM
Best OpenGL Notebook Graphics cosiek Linux - Laptop and Netbook 1 08-28-2003 01:41 AM


All times are GMT -5. The time now is 02:24 PM.

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