Hi,
I wanted some details regarding the SDL architecture over X11.
I have few doubts to be cleared.
- X11 is a network transparent graphics layer, which doesnt give
direct access to framebuffer to its clients.
That is not entirely true. High performance graphics is usually (always)
implement under X11 by having the X server manage windows but not do the
rendering. The rendering is done through an OS level device driver. The
server and the driver communicate so that the driver knows where to
render and how to clip. The client and the driver communicate to send
rendering commands to the GPU. The result is that the high performance
rendering path does not involve the wire protocol and is as fast as is
possible.
By using Xlib, the graphics data should pass through a network layer,
even if the X server is running in the same machine. So if SDL is
running over the X11, in this manner, will it affect the performance.
Again, that depends. If you use OpenGL to do your rendering then the
rendering commands do not pass over the wire protocol and are not
slowed down. If you use SDL graphics to do your rendering then, yes, it
slows you down. SDL does everything it can to work as fast as it can on
X11. But, as you point out, what it can do is limited.
And if this is so how can SDL claim, that it is a direct interface to
video display.
It gives you the most direct access possible on the system you are
using. On many systems it does give direct access. Though I have to say
that there are very few systems that give you direct access to the frame
buffer and with modern GPUs there are very few cases where you would
want direct access to the frame buffer.
- There is an extension to X11 called XSHM (shared memory extension).
By using this extension, is the routing of data through network layer
avoided? ( i read somewhere that it uses shared memory to transfer
data between client and server)
Yes, that is what it does.
Does SDL use this extension ?
Yes, if it is available
- Also there is a SDL port over DGA?
Yes.
Can Xlib route the calls through DGA ?
I do not understand the question. Once you have established control of a
frame buffer through DGA you no long use Xlib except to get back out of
DGA mode. DGA is not a communications method and does not let you use
Xlib for rendering
- Given a requirement to run an application on the native display,
and with high performance , which port of SDL is best–X11 or X11 -SHM
or DGA or directfb?
SDL/OpenGL. None of the ones you list make good use of the rendering
hardware and therefore do not give “high performance”. Of course, I am
assuming that your definition of “high performance” and mine are the
same.
A lot of these issues are covered by the three articles linked from
Bob PendletonOn Wed, 2007-04-25 at 13:30 +0530, Pavan Krishnamurthy wrote:
Please, if anybody can point to a link where I can find relevent docs
on these issues, it will be of great help. I am finding lots of docs,
but none pin pointing the issues.
Thanks in advance.
Regards,
Pavan
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
–
±-------------------------------------+