PDA

View Full Version : OpenGL without X?



linux-newb
04-22-2001, 12:21 PM
Kind of a newbie question...but

How does one render openGL without going through X?

Like if you just wanted to render full screen. Is this possible? Are drivers with HW acceleration available?

If not, are there any linux projects working on this?

I guess my question is: how do current linux games work? Do they require X?

rts
04-22-2001, 01:53 PM
Kind of a newbie question...but

How does one render openGL without going through X?



There are OpenGL implementation that go through something like SVGAlib. You can also render to bitmaps with Mesa.



Like if you just wanted to render full screen. Is this possible? Are drivers with HW acceleration available?


Of course, and this is most easily done via X, in fact.




I guess my question is: how do current linux games work? Do they require X?

The vast majority of them do require X, yes.

linux-newb
04-22-2001, 02:16 PM
I guess I should of asked how you do you do HW accelerated openGL under linux without using X?




[This message has been edited by linux-newb (edited 04-22-2001).]

rts
04-22-2001, 02:59 PM
I guess I should of asked how you do you do HW accelerated openGL under linux without using X?



No way that I know of, but I'm sure there must be some way.

If not, it might be an interesting project http://www.opengl.org/discussion_boards/ubb/smile.gif

anonymous
04-22-2001, 03:39 PM
>Like if you just wanted to render full screen. Is this possible? Are drivers with HW acceleration available?
Yes. But you do not need use X/fullscreen(DGA/DRI) functions directly
You can use SDL ( http://www.libsdl.org/ )
.........
SDL_Surface *screen;
SDL_Init(SDL_INIT_VIDEO);
screen = SDL_SetVideoMode(1024, 768, 16, SDL_OPENGL|SDL_FULLSCREEN); //simple,portable.....
.........

or glut
.........
glutGameModeString("640x480:16@60"); //it do not work on my Voodoo3/X4 (hmm?)
glutEnterGameMode();
........

P.S Why you dont like X?

rts
04-22-2001, 04:09 PM
I'm pretty sure glut still needs X.

Don't know about SDL though.

anonymous
04-22-2001, 06:36 PM
GLUT or SDL needs to control HW X&OpenGL on UNIX, something&OpenGL on MacOS, something&OpenGL on MSWindows etc....
i answer about fullscreen in X only

linux-newb
04-22-2001, 08:28 PM
why not x? Seems very wasteful to need a windowing system with as much stuff as X to play a game.. Especially on a platform where you have lots of control (unlike win32)..

Anyway, its seems to be the only video drivers for linux (other than Xfree86) are ggi or kgi.

Has anyone here wrote an openGL program that renders to ggi (or any other alternative)? I could barely find any docs on their site.
thanks....

anonymous
04-23-2001, 07:04 PM
HW OpenGL present on X only, all other progect died de facto(as i know)
$xinit /usr/games/quake/q3a
i use it to run q3a on 32Mb: no window manadger, no multiple virtual screens, no .... - core X only(1.5Mb),- support 2 api for set free part of this memory? hmm....