LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Need info about Linux graphics (e.g. OpenGL) (https://www.linuxquestions.org/questions/programming-9/need-info-about-linux-graphics-e-g-opengl-284038/)

kornerr 01-30-2005 09:36 AM

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.

Hko 01-30-2005 09:58 AM

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).

kornerr 01-30-2005 10:06 AM

Hey, hey, I didn't say VERY boring - it's boring to learn smth new :)
______________
Looking your links now...

kornerr 01-30-2005 01:11 PM

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' >(

Hko 01-30-2005 03:12 PM

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...

deiussum 01-30-2005 03:16 PM

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. :)

deveraux83 01-30-2005 03:59 PM

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.

kornerr 01-31-2005 10:46 AM

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.

Hko 01-31-2005 01:00 PM

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

kornerr 01-31-2005 02:00 PM

Downloading for now... Thanks. I will post someday my opinion...

kornerr 08-12-2005 02:28 PM

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 :rolleyes:

lowpro2k3 08-12-2005 05:24 PM

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 :) :study:


All times are GMT -5. The time now is 08:48 PM.