Graphics without X-Server

Hi,
i want to write a C/C++ App. that Plott’s a Sinus-Wave on the Monitor.
My Only Problem is: the tartget-Plattform isn’t running a X-Server.

So, i want to write my App. with svgalib and SDL.

My Question: Can Anyone tell me, how to Code a app, that displays simple
Graphics (such as Lines, Triangles, etc) on the screen, without running the
XServer ???

Greeting’s
DanDanger

I don’t know anything about svgalib, or how it works w/ SDL, but if you
want to write with SDL and display w/o an x server, you could always use
the framebuffer video driver, assuming your target platform is Linux.

– chris (@Christopher_Thielen)On Sun, 2002-07-28 at 05:32, Dan Danger wrote:

So, i want to write my App. with svgalib and SDL.

My Question: Can Anyone tell me, how to Code a app, that displays simple
Graphics (such as Lines, Triangles, etc) on the screen, without running the
XServer ???

So, i want to write my App. with svgalib and SDL.

I’d use the Linux framebuffer device instead of svgalib, if I were you.

My Question: Can Anyone tell me, how to Code a app, that displays simple
Graphics (such as Lines, Triangles, etc) on the screen, without running the
XServer ???

Look for examples of rendering graphic primitives on the SDL website’s
libraries page. Generally, you have to do all the rendering by hand, pixel
by pixel, into the surface’s framebuffer. The libraries on that page do it
for you, or at least will give you an idea of how to do it.

Also do a websearch for Michael Abrash’s Graphics Programming Black
Book…there are legal copies of it in PDF floating around the net. That
will give you some wicked fast, dark voodoo magic ways to render
primitives to a framebuffer.

In terms of SDL, you write to a linear framebuffer, and SDL gets it to the
screen. It handles the X-server, or svgalib, or whatever, behind the
scenes. If there’s no X-server, it will try to fall back to other means of
display…you just need to set up your video mode and see if SDL could
accomodate it. Then you interact with SDL the same regardless of the
actual video target.

–ryan.