Init 2

i wrote simple test program, and i was shocked !

it’s attached.
all answers are no or 0. Only window manager is on my X system, acording to
SDL !
what is wrong ?

Grzegorz Jaskiewicz
C/C++/PERL/PHP/SQL Programmer
-------------- next part --------------
A non-text attachment was scrubbed…
Name: gr.cpp
Type: application/octet-stream
Size: 1589 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020530/d08bd8b2/attachment.obj

i wrote simple test program, and i was shocked !

it’s attached.
all answers are no or 0. Only window manager is on my X system, acording to
SDL !
what is wrong ?

That is normal if you are using Xwindows. (Unless you use DGA?)_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

i wrote simple test program, and i was shocked !

it’s attached.
all answers are no or 0. Only window manager is on my X system, acording
to

SDL !
what is wrong ?

That is normal if you are using Xwindows. (Unless you use DGA?)

if so, then how should i make detection of that stuff !!!

I think you misunderstand. That stuff is being detected correctly as not
available.On Thu, May 30, 2002 at 07:14:12PM +0200, Grzegorz Jaskiewicz wrote:

That is normal if you are using Xwindows. (Unless you use DGA?)
if so, then how should i make detection of that stuff !!!


Matthew Miller @Matthew_Miller http://www.mattdm.org/
Boston University Linux ------> http://linux.bu.edu/

“Grzegorz Jaskiewicz” <gj_22 at wp.pl> wrote in message
news:mailman.1022778788.30798.sdl at libsdl.org

i wrote simple test program, and i was shocked !

it’s attached.
all answers are no or 0. Only window manager is on my X system,
acording
to

SDL !
what is wrong ?

That is normal if you are using Xwindows. (Unless you use DGA?)

if so, then how should i make detection of that stuff !!!

Everything is detected correctly. You really don’t have any kind of
hardware acceleration under X. Deal with it.–
Rainer Deyke | root at rainerdeyke.com | http://rainerdeyke.com

Everything is detected correctly. You really don’t have any kind of
hardware acceleration under X. Deal with it.
???

i wrote simple test program, and i was shocked !

it’s attached.
all answers are no or 0. Only window manager is on my X system, acording to
SDL !
what is wrong ?

This is a FAQ:
http://www.libsdl.org/faq.php?action=listentries&category=2#20

-Sam Lantinga, Software Engineer, Blizzard Entertainment

Grzegorz,

What they trying to say is the following :

  1. SDL (or X11/X-Window System for that matter) doesn’t support
    hardware accelerated surfaces with the X-Window System (or
    X, X11, X-Windows or how you want to call it).

  2. SDL supports hardware accelerated surface when you make use
    of the DGA library/toolkit.

  3. SDL supports hardware acceleration (only?) under OpenGL by
    making use of the GLX libraries.

I hope this clears it :slight_smile: (Any errors, please make them correct).

Regards,

Niels Wagenaar> -----Original Message-----

From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org] On
Behalf Of Grzegorz Jaskiewicz
Sent: donderdag 30 mei 2002 19:34
To: sdl at libsdl.org
Subject: Re: [SDL] init 2

Everything is detected correctly. You really don’t have
any kind of
hardware acceleration under X. Deal with it.
???


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

I’m not sure eight question marks counts as “dealing”.On Thu, May 30, 2002 at 07:33:51PM +0200, Grzegorz Jaskiewicz wrote:

Everything is detected correctly. You really don’t have any kind of
hardware acceleration under X. Deal with it.
???


Matthew Miller @Matthew_Miller http://www.mattdm.org/
Boston University Linux ------> http://linux.bu.edu/

Sorry folks (Grzegorz in particular, of course) if this comment came across
as more harsh than necessary; I didn’t mean it to be.On Thu, May 30, 2002 at 02:03:32PM -0400, Matthew Miller wrote:

I’m not sure eight question marks counts as “dealing”.


Matthew Miller @Matthew_Miller http://www.mattdm.org/
Boston University Linux ------> http://linux.bu.edu/

This is a FAQ:
http://www.libsdl.org/faq.php?action=listentries&category=2#20

software buffer==sloooow buffer,
do that means that i have to write it for OpenGL to have real fast 2d
graphics ?
guys from xfree should consider that, and change it !

what DGA is ?
i will look in web, but clarify me what does it have with sdl, xwindows and
*nix ?

GJ.

I’m not sure eight question marks counts as “dealing”.

Sorry folks (Grzegorz in particular, of course) if this comment came
across
as more harsh than necessary; I didn’t mean it to be.

sorry :confused:

I’m new to X development. And I am just digging problems…
is that lists are for ?

gj.

This is a FAQ:
http://www.libsdl.org/faq.php?action=listentries&category=2#20

software buffer==sloooow buffer,

Depends on what you compare it to, but getting stuff into VRAM is
indeed a serious performance issue. However, if the (2D) driver doesn’t
support h/w accelerated blits, software surfaces are the way to go.
(Well, they’re usually the only kind you can get when there’s no h/w
accelerated blits, but there’s no guarantee. There are a few
unaccelerated targets that can still give you hardware surfaces if you
ask.)

do that means that i have to write it for OpenGL to have real fast 2d
graphics ?

If your definition of “really fast” is similar to mine; yes, that seems
to be the only remotely reliable way. (Despite all these issues with
broken OpenGL features, I’d still say you’re much more likely to find a
working OpenGL setup than any other kind of accelerated video on Linux.)

guys from xfree should consider that, and change it !

Well, they wouldn’t be the first…

what DGA is ?
i will look in web, but clarify me what does it have with sdl, xwindows
and *nix ?

It’s a very low level “direct access” API for X. It requires root
privileges, but it can provide accelerated blits, if the drivers
support it.

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Thursday 30 May 2002 20:09, Grzegorz Jaskiewicz wrote:

what DGA is ?
i will look in web, but clarify me what does it have with sdl, xwindows
and *nix ?

It’s a very low level “direct access” API for X. It requires root
privileges, but it can provide accelerated blits, if the drivers
support it.

but X server runs with root priviliges, at least some parts. So i guess
graphics stuff under X windows should use it !
on the other hand, everything should be done way that doesn’t requires root
priviliges ( in modules fe ).But i guess guys from
xfree.org cannot do that becouse of portability issues…
don’t you think so ?

gj.

software buffer==sloooow buffer,
do that means that i have to write it for OpenGL to have real fast 2d
graphics ?
guys from xfree should consider that, and change it !

We should really remove those flags from the next revision of SDL…all
they seem to be used for is causing developer panic under X11.

A software buffer is frequently faster than a hardware buffer, which goes
against intuition at first. Accessing video RAM directly is slow. It is
much faster to do your work in system RAM (a software surface), and when
you are done scribbling on the surface, send it in batch to the X server,
which will then do a hardware-accelerated blit to video RAM (assuming that
you have accelerated drivers, of course).

Software surface-based games that do a lot of calculations (I’m thinking
Doom, Build, and Quake 1/2 with the software renderer) all get impressive
framerates, even under X11.

So perhaps, “deal with it” isn’t the best response; “don’t worry about
it” would be better.

–ryan.

If your definition of “really fast” is similar to mine; yes, that seems
to be the only remotely reliable way. (Despite all these issues with
broken OpenGL features, I’d still say you’re much more likely to find a
working OpenGL setup than any other kind of accelerated video on Linux.)

Just to echo David’s comments: OpenGL is going to give you better
framerates, and doubly so at higher resolutions and color depths. Writing
OpenGL code is very different from writing to a 2D linear framebuffer,
though, and your code will be less likely to run out of the box
(especially on today’s Linux, where the majority of systems seem to have
misconfigured or nonexistant OpenGL support).

Like all things in game development, there are no absolutes, just
trade-offs. Find what’s best out of a collection of flawed solutions.
That’s what makes it exciting. :slight_smile:

–ryan.

Just to echo David’s comments: OpenGL is going to give you better
framerates, and doubly so at higher resolutions and color depths. Writing
OpenGL code is very different from writing to a 2D linear framebuffer,
though, and your code will be less likely to run out of the box
(especially on today’s Linux, where the majority of systems seem to have
misconfigured or nonexistant OpenGL support).

Like all things in game development, there are no absolutes, just
trade-offs. Find what’s best out of a collection of flawed solutions.
That’s what makes it exciting. :slight_smile:

Hear hear! :slight_smile:

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

“Ryan C. Gordon” wrote in message
news:mailman.1022800327.14729.sdl at libsdl.org

Just to echo David’s comments: OpenGL is going to give you better
framerates, and doubly so at higher resolutions and color depths.
Writing
OpenGL code is very different from writing to a 2D linear
framebuffer,
though, and your code will be less likely to run out of the box
(especially on today’s Linux, where the majority of systems seem to
have
misconfigured or nonexistant OpenGL support).

Not just “less likely to run out of the box”, but less likely to run
at all. One of my computers (win98 BTW) has a Voodoo Banshee, which
only has 3D acceleration at 16 bpp (and my desktop is at 32 bpp). My
other computer has no 3D acceleration at all. (Running OpenGL without
acceleration is for all intents and purposes the same as not running
at all.)–
Rainer Deyke | root at rainerdeyke.com | http://rainerdeyke.com

So perhaps, “deal with it” isn’t the best response; “don’t worry about
it” would be better.

:wink:

ok.

so there is only one man that really answer me, for that question.
thx.

So, to be clear, when the call returns that software to hardware blits are
not accelerated, that’s different than saying that the X server won’t do
hardware-accelerated blits?On Thu, May 30, 2002 at 07:11:01PM -0400, Ryan C. Gordon wrote:

A software buffer is frequently faster than a hardware buffer, which goes
against intuition at first. Accessing video RAM directly is slow. It is
much faster to do your work in system RAM (a software surface), and when
you are done scribbling on the surface, send it in batch to the X server,
which will then do a hardware-accelerated blit to video RAM (assuming that
you have accelerated drivers, of course).


Matthew Miller @Matthew_Miller http://www.mattdm.org/
Boston University Linux ------> http://linux.bu.edu/