GUI and API on Linux

So far I have been writing computer programs for Windows using WinAPI. But I'd like to write portable code for my programs. And I know nothing about Linux's equivalent to WinAPI except the names "X Window System" and "window manager". So how do these things work on Linux? Do I use X, a window manager's API or both? I'll also need (links to) good tutorials if you know any.
If you are looking to do GUI programming, I would recommend using a GUI library such as Qt. You _can_ use X directly, but that is akin to using Windows system calls to create/manage windows as opposed to using the .NET framework.
I don't need GUI programming. I just need the basics, like the first code example in this page:

http://www.geocities.com/Heartland/Meadows/9818/win32tut/gdi.html

I just need to open a simple window that supports OpenGL.

But wxWidgets is a GUI library...I have an idea. Here's a link to a tutorial that shows how you open a window with WinAPI and draw into it with OpenGL:

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=01

I need the same functionality in Linux. Setting up OpenGL in Linux. Without GLUT, without a high-level GUI toolkit. Just the standard way to open a window in Linux. I'd be more specific if I knew how these things work on Linux...
The difference between windows and linux is that windowing capabilities are built directly into the windows kernel. windowing capabilities on Unix are accomplished via X, which is not usable/accessible without a library. ie, you won't be able to open a window in Unix by just using system calls.
> via X, which is not usable/accessible without a library...

Actually, X is a library...

If Tom Backton really (really, really) wants to do it without a fancy GUI toolkit, take a read through


However, if he really wants cross-platform windowing, he is better off using a toolkit like Trolltech Qt, wxWindows, FLTK, GTK+, etc. Find more here:

The GUI Toolkit, Framework Page
http://www.free-soft.org/guitool/


Hope this helps.
Topic archived. No new replies allowed.