🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Graphics under Linux

Started by
11 comments, last by MetalFox 24 years, 10 months ago
No, you can also use SVGALIB or fbcon. Preferably you should go through the GGI library. If you do that then your application will automatically support X, SVGALIB, AND fbcon at the same time.

Greetings,

------------------
Jorrit Tyberghein.
Project manager of Crystal Space: An open source 3D engine for Linux, Windows, OS/2, BeOS, ...

Jorrit Tyberghein.Project manager of Crystal Space: An open source 3D engine for Linux, Windows, and MacOS/XURL: http://www.crystalspace3d.org
Advertisement
Allegro is also being ported to Linux. It too uses SVGALib, fbcon, FreeBE/AF (that is, an enhanced version of Scitech's VBE/AF drivers) and X (though not yet XXA). It can take advantage of GGI if available.

------------------
=> Arfa <=

=> Arfa <=
Personally, I recommend using X and something like DGA (or if speed isn't your most important issue, "man XPutImage"), as most newbies to Linux will be scared by console games (as in SVGAlib).

However, I havn't yet found a way to change colour depth in X... (XF86VidMode* only changes resolution...)

------------------
Mark Collnis
- EHB Software

After careful deliberation, I have come to the conclusion that Nazrix is not cool. I am sorry for any inconvienience my previous mistake may have caused. We now return you to the original programming

I believe you actually have to alter your XF86Config...not sure if there's an xlib call. (I have a few seperate ones for GNOME, xdoom, and xquake, which I like in different resolutions.

[This message has been edited by Jered (edited August 03, 1999).]

That's my point exactly...

THings would be sooo much nicer if you *could* change the colour depth without retstarting X... (You must restart Windows before changes take effect, ring any bells?)

This is a *major* disadvantage...

Unless you write code that detects the colour depth and compensate accordingly (my XAccess library will do that, but that's beside the point), thngs can get very awkward...

After careful deliberation, I have come to the conclusion that Nazrix is not cool. I am sorry for any inconvienience my previous mistake may have caused. We now return you to the original programming

You know, XF86 4.0 is still a little ways away... Perhaps we should push for option of changing color depth on the fly, as i believe can be done in windows with DirectX (correct me if i'm wrong). This would be a very nice feature which i believe would really benefit Linux game development as a whole, since X will likely be the prime platform for newer games developed for Linux.

Thoughts, comments?
Shelrem

Yes, that is the case with DirectX. One of its advantages is that it can switch to any available screen resolution and color depth on the fly. Otherwise, you'd have to require users to already be in a certain color mode.

While I'm posting, I might as well ask this: Is there a standard Linux API that controls things like menus, buttons, etc., for you to implement in your program? Or not? Is that why all Linux apps look like console apps?

------------------
~CGameProgrammer( );

~CGameProgrammer( ); Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
If you're developing in X, you have the Xlib to work with. I believe there are a number of other toolsets out there for development. In some cases, if you're using an XWindows manager such as the K Desktop, there's specific API's or toolkits made for certain managers. I think Xlib is more or less the standard library for XWindows development though.
There are 2 "standard" APIs for Windows, Menus, Dialog boxes etc...

Qt/KDE (www.kde.org) and GNOME (www.gnome.org)

There are a few more, but those are the most popular...

On the subject of X colour switching, I think we should contact the Xfree86 project and make this little request. 'tis a good idea.

------------------
Mark Collnis
- EHB Software

After careful deliberation, I have come to the conclusion that Nazrix is not cool. I am sorry for any inconvienience my previous mistake may have caused. We now return you to the original programming

Update:

I've sent off a letter to the XFree86 project about switching color depths on the fly, but it looks like that might already be in the plan (the FAQ was a bit vague about it.) I just thought i'd mention this, and i'll let you all know if i get a response. I'm looking forward to more games in X, myself, with this change..

-Shelrem

This topic is closed to new replies.

Advertisement