The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Getting rid of x11 && sdl?
deco33000 Jog
Guest

Hello,

System : freebsd 10.2. 64-bit.

I have a very specific need (I cannot develop too much) and I need to remove as much code as possible out of a system.

My goal is to recreate a -very minimal- x11, even lighter than Wayland. But I am worried that lot of graphics rely on it (obviously).

Is it possible to use the SDL withotu x11 to create simple GUIs? If yes, are there graphic brand you advise?
Will I be able to do light 3d rendering?

I thought about mesa and egl. What your experience with those?

I know it may sound silly to get rid of x11 but I would be hearing from experts (you).

Thanks
--š
Jog
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Getting rid of x11 && sdl?
MrOzBarry


Joined: 26 Jun 2010
Posts: 620
At the end of the day, you're going to need some sort of backend to handle how things are rendered.  Checkout this post about different X11/alternative implementations.

On Thu, Sep 24, 2015 at 8:59 AM, deco33000 Jog wrote:
Quote:
Hello,

System : freebsd 10.2. 64-bit.

I have a very specific need (I cannot develop too much) and I need to remove as much code as possible out of a system.

My goal is to recreate a -very minimal- x11, even lighter than Wayland. But I am worried that lot of graphics rely on it (obviously).

Is it possible to use the SDL withotu x11 to create simple GUIs? If yes, are there graphic brand you advise?
Will I be able to do light 3d rendering?

I thought about mesa and egl. What your experience with those?

I know it may sound silly to get rid of x11 but I would be hearing from experts (you).

Thanks
-- 
Jog
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Getting rid of x11 && sdl?
deco33000 Jog
Guest

precisely Barry, i read that SDL has framebuffer support. Could it be of use here?

--š
Jog


24.09.2015, 15:37, "Alex Barry":
Quote:
At the end of the day, you're going to need some sort of backend to handle how things are rendered.š Checkout this post about different X11/alternative implementations.

On Thu, Sep 24, 2015 at 8:59 AM, deco33000 Jog wrote:
Quote:
Hello,

System : freebsd 10.2. 64-bit.

I have a very specific need (I cannot develop too much) and I need to remove as much code as possible out of a system.

My goal is to recreate a -very minimal- x11, even lighter than Wayland. But I am worried that lot of graphics rely on it (obviously).

Is it possible to use the SDL withotu x11 to create simple GUIs? If yes, are there graphic brand you advise?
Will I be able to do light 3d rendering?

I thought about mesa and egl. What your experience with those?

I know it may sound silly to get rid of x11 but I would be hearing from experts (you).

Thanks
--
Jog
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

,

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Getting rid of x11 && sdl?
deco33000 Jog
Guest

I am sorry Alex, I called you Barry.

Very sorry (shame on me)

--š
Jog


24.09.2015, 15:51, "deco33000 Jog":
Quote:
precisely Barry, i read that SDL has framebuffer support. Could it be of use here?

--
Jog

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Getting rid of x11 && sdl?
Raymond Jennings
Guest

I assume you're looking to possibly replace x11 and go directly to the video card or the kernel's device drivers?

How deep down the software stack are you looking to venture for your goals?  We have SDL, then it sits on top of whatever, and that whatever may well have libraries and APIs to go through before it hits the actual hardware, and at some point in that stack you'll cross into kernel space.

On Thu, Sep 24, 2015 at 10:52 AM, deco33000 Jog wrote:
Quote:
I am sorry Alex, I called you Barry.

Very sorry (shame on me)

-- 
Jog


24.09.2015, 15:51, "deco33000 Jog":
Quote:
precisely Barry, i read that SDL has framebuffer support. Could it be of use here?

--
Jog

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Getting rid of x11 && sdl?
deco33000 Jog
Guest

Raymond, exact.
š
I massively customized a freebsd system (which is used everyday by professionals) and am flying in the freebsd kernel (except the graphic part which is new to me).
š
I am ready to do anything to fulfill the goal, no matter the amount of work (the limit is obviously to not force makers to make specific drivers for my system).
š
You have a plan? Smile
š
--š
Jog
š
š
š
24.09.2015, 19:57, "Raymond Jennings":
Quote:
I assume you're looking to possibly replace x11 and go directly to the video card or the kernel's device drivers?š
How deep down the software stack are you looking to venture for your goals?š We have SDL, then it sits on top of whatever, and that whatever may well have libraries and APIs to go through before it hits the actual hardware, and at some point in that stack you'll cross into kernel space.On Thu, Sep 24, 2015 at 10:52 AM, deco33000 Jog wrote:
Quote:
I am sorry Alex, I called you Barry. Very sorry (shame on me) --š Jog 24.09.2015, 15:51, "deco33000 Jog": > precisely Barry, i read that SDL has framebuffer support. Could it be of use here? > > -- > Jog > _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





,
_______________________________________________SDL mailinghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Getting rid of x11 && sdl?
Emmanuel Gil Peyrot
Guest

On Thu, Sep 24, 2015 at 02:59:32PM +0200, deco33000 Jog wrote:
Quote:
Hello,

System : freebsd 10.2. 64-bit.

Disclaimer: I know pretty much nothing about non-Linux systems, but I
hope you will find this information useful.

Quote:

I have a very specific need (I cannot develop too much) and I need to remove as much code as possible out of a system.

My goal is to recreate a -very minimal- x11, even lighter than Wayland. But I am worried that lot of graphics rely on it (obviously).

What are your actual requirements? And in which way isn’t Wayland
adapted for them?

Quote:

Is it possible to use the SDL withotu x11 to create simple GUIs? If yes, are there graphic brand you advise?
Will I be able to do light 3d rendering?

SDL 1.2 did have fbdev support, but this driver is bad and doesn’t
support anything you’d expect from a modern display API: you will
always get tearing, you can’t control the framerate, you can’t use 3D
nor 2D acceleration… Really, don’t bother.

DRM is the way to go, I did start a SDL 2.0 DRM backend long ago but I
never went anywhere with it, this would be what you want.

As for the GPU, on Linux anything supported by Mesa is good to go, I
personally use an Intel one.

Quote:

I thought about mesa and egl. What your experience with those?

If you want to use OpenGL or OpenGL ES on anything but X11, the API
used to get the context is EGL, this is what Weston uses for its DRM
compositor for example, and what Wayland clients use to display
anything 3D.

Quote:

I know it may sound silly to get rid of x11 but I would be hearing from experts (you).

I don’t think it is any silly. Smile

But I don’t see the point in reinventing Wayland either, you should
look into it, even though I’m quite sure no compositor runs out of the
box on FreeBSD.

Quote:

Thanks
-- 
Jog
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

--
Emmanuel Gil Peyrot

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Getting rid of x11 && sdl?
deco33000 Jog
Guest

Thanks Emmanuel,

Yes I would like to optimize the speed and security of x11. i've already written the code to manage events and clicks, but I was worried about rendering and eventually 3d acceleration (which matters a lot).

The goal is to specialize for a given hardware (always the same) and minimize electric consumption and possible delays (hard real time is a coming requirement for that system, which, fortunately, is already tackled in this custom system).

Wayland, is the direction but way too broad and uses xml, which is too slow to parse (even with a very good parser. I just have enough time for array enumeration on the same cache line).

So I evolve on a -very- specific -and specialized- need.

I had a look at drm and egl. They seem to do what I need.

In the end, I will have to fiddle with EGL + DRM + MESA, right?

-- 
Jog


25.09.2015, 00:22, "Emmanuel Gil Peyrot":
Quote:
On Thu, Sep 24, 2015 at 02:59:32PM +0200, deco33000 Jog wrote:
Quote:
 Hello,

 System : freebsd 10.2. 64-bit.

Disclaimer: I know pretty much nothing about non-Linux systems, but I
hope you will find this information useful.

Quote:
 I have a very specific need (I cannot develop too much) and I need to remove as much code as possible out of a system.

 My goal is to recreate a -very minimal- x11, even lighter than Wayland. But I am worried that lot of graphics rely on it (obviously).

What are your actual requirements? And in which way isn’t Wayland
adapted for them?

Quote:
 Is it possible to use the SDL withotu x11 to create simple GUIs? If yes, are there graphic brand you advise?
 Will I be able to do light 3d rendering?

SDL 1.2 did have fbdev support, but this driver is bad and doesn’t
support anything you’d expect from a modern display API: you will
always get tearing, you can’t control the framerate, you can’t use 3D
nor 2D acceleration… Really, don’t bother.

DRM is the way to go, I did start a SDL 2.0 DRM backend long ago but I
never went anywhere with it, this would be what you want.

As for the GPU, on Linux anything supported by Mesa is good to go, I
personally use an Intel one.

Quote:
 I thought about mesa and egl. What your experience with those?

If you want to use OpenGL or OpenGL ES on anything but X11, the API
used to get the context is EGL, this is what Weston uses for its DRM
compositor for example, and what Wayland clients use to display
anything 3D.

Quote:
 I know it may sound silly to get rid of x11 but I would be hearing from experts (you).

I don’t think it is any silly. :)

But I don’t see the point in reinventing Wayland either, you should
look into it, even though I’m quite sure no compositor runs out of the
box on FreeBSD.

Quote:
 Thanks
 --
 Jog
 _______________________________________________
 SDL mailing list
 
 http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

--
Emmanuel Gil Peyrot
,

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Getting rid of x11 && sdl?
Alexander Sabourenkov
Guest

Also, forget about hard real-time in 3d accel.
Getting rid of x11 && sdl?
Alexander Sabourenkov
Guest

If 3D accel is a requirement, X11's performance overhead is negligible.


The only choice left is X11 vs Wayland. I'd choose X11, on maturity grounds. You will not be able to do anything to the security angle outside of what the configuration and feature set selection allow   anyway.
Getting rid of x11 && sdl?
deco33000 Jog
Guest

Sorry I didn't make my point on 3d accel very clear.
3d accel is needed but for soft real time or normal apps, hard real time will be headless and coming next for some security application.

So you don't think drm + egl + mesa is a good fit Alexander?

--š
Jog


25.09.2015, 21:48, "Alexander Sabourenkov":
Quote:
If 3D accel is a requirement, X11's performance overhead is negligible.

The only choice left is X11 vs Wayland. I'd choose X11, on maturity grounds. You will not be able to do anything to the security angle outside of what the configuration and feature set selection allowšš anyway.

,

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Getting rid of x11 && sdl?
Alexander Sabourenkov
Guest

Well, there's either drm+egl_as_implemented_in_mesa or some_vendor_blob, generally.


So it's not like you have much choice here. If it's acceptably supported under mesa, I'd go with it, otherwise it's no choice at all.


What's left is window managent and input handling. You didn't quite mention what your platform or requirements are, so I can't really say much apart from reiterating that 'optimizing' x11 will most likely be a waste of time apart from cutting out unused stuff, be it via build or config.


I also don't understand your comment on Wayland being limited by XML parsing. It's protocol specification is in XML, yes, but so is X11's, the data on the wire is binary of course.