Can't Get Hardware Surface

No matter what I try I can’t seem to get a hardware surface with thu
latest SDL. I’ve tried all combinations of running as root or not, and
asking for a fullscreen or double buffered surface. I am using the same
color depth that my X server is running at (16bit). Any ideas? (I do
get a fullscreen surface, just not in video memory)

Test Code:

#include <SDL/SDL.h>
int main() {
SDL_Surface *screen;
SDL_Init( SDL_INIT_VIDEO );

    screen = SDL_SetVideoMode( 640, 480, 16, SDL_FULLSCREEN |

SDL_HWSURFACE );

    if( (screen->flags & SDL_HWSURFACE)== SDL_HWSURFACE ) {
            printf( "SCR In Video Memory\n" );
    }
    else {
            printf( "SCR Not In Memory\n" );
    }
    SDL_Quit();

}

Stuart Anderson

No matter what I try I can’t seem to get a hardware surface with thu
latest SDL. I’ve tried all combinations of running as root or not, and
asking for a fullscreen or double buffered surface. I am using the same
color depth that my X server is running at (16bit). Any ideas? (I do
get a fullscreen surface, just not in video memory)

That was my whole question a couple of weeks ago:
Will anyone miss the hardware surface support under X11?

Nobody seemed to mind, so I dropped it until a DGA 2.0 driver could be
written with hardware acceleration support. DGA 1.0 does not have hardware
acceleration support, and is often slower than the new fullscreen code,
which doesn’t use DGA, and does not require root permissions.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

The latest SDL was changed to not use DGA, therefore you never get a
hardware surface under X.

This is the major thread that Sam was adking for opinions on during the
recent fullscreen update.–
Brian

On Wed, 19 Jan 2000, Stuart Anderson wrote:

No matter what I try I can’t seem to get a hardware surface with thu
latest SDL. I’ve tried all combinations of running as root or not, and
asking for a fullscreen or double buffered surface. I am using the same
color depth that my X server is running at (16bit). Any ideas? (I do
get a fullscreen surface, just not in video memory)

Test Code:

#include <SDL/SDL.h>
int main() {
SDL_Surface *screen;
SDL_Init( SDL_INIT_VIDEO );

   screen = SDL_SetVideoMode( 640, 480, 16, SDL_FULLSCREEN |

SDL_HWSURFACE );

   if( (screen->flags & SDL_HWSURFACE)== SDL_HWSURFACE ) {
           printf( "SCR In Video Memory\n" );
   }
   else {
           printf( "SCR Not In Memory\n" );
   }
   SDL_Quit();

}

Stuart Anderson

hi`

AFAIK DGA isn’t used for DirectVideo in the latest CVS anymore.

(AFAIK the official word from the XFree team is that DGA 1.0 should die/
is dead ;))

Stuart Anderson wrote:>

No matter what I try I can’t seem to get a hardware surface with thu
latest SDL. I’ve tried all combinations of running as root or not, and
asking for a fullscreen or double buffered surface. I am using the same
color depth that my X server is running at (16bit). Any ideas? (I do
get a fullscreen surface, just not in video memory)

Test Code:

#include <SDL/SDL.h>
int main() {
SDL_Surface *screen;
SDL_Init( SDL_INIT_VIDEO );

    screen = SDL_SetVideoMode( 640, 480, 16, SDL_FULLSCREEN |

SDL_HWSURFACE );

    if( (screen->flags & SDL_HWSURFACE)== SDL_HWSURFACE ) {
            printf( "SCR In Video Memory\n" );
    }
    else {
            printf( "SCR Not In Memory\n" );
    }
    SDL_Quit();

}

Stuart Anderson


Daniel Vogel My opinions may have changed,
666 @ http://grafzahl.de but not the fact that I am right

That was my whole question a couple of weeks ago:
Will anyone miss the hardware surface support under X11?

Nobody seemed to mind, so I dropped it until a DGA 2.0 driver could be
written with hardware acceleration support. DGA 1.0 does not have hardware
acceleration support, and is often slower than the new fullscreen code,
which doesn’t use DGA, and does not require root permissions.

In that case, as long as it will return under DGA 2.0, this isn’t a
problem for me.

Stuart

NO! I DON’T CARE!!!

:)On Wed, 19 Jan 2000, Sam Lantinga wrote:

No matter what I try I can’t seem to get a hardware surface with thu
latest SDL. I’ve tried all combinations of running as root or not, and
asking for a fullscreen or double buffered surface. I am using the same
color depth that my X server is running at (16bit). Any ideas? (I do
get a fullscreen surface, just not in video memory)

That was my whole question a couple of weeks ago:
Will anyone miss the hardware surface support under X11?

Nobody seemed to mind, so I dropped it until a DGA 2.0 driver could be
written with hardware acceleration support. DGA 1.0 does not have hardware
acceleration support, and is often slower than the new fullscreen code,
which doesn’t use DGA, and does not require root permissions.

-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software

“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Daniel Vogel wrote:

AFAIK DGA isn’t used for DirectVideo in the latest CVS anymore.

(AFAIK the official word from the XFree team is that DGA 1.0 should die/
is dead ;))

Still temporarily useful to get mouse deltas (I think you don’t need to
be on the local host or have root privileges to do this)…–
Pierre Phaneuf
Ludus Design, http://ludusdesign.com/

Daniel Vogel wrote:

AFAIK DGA isn’t used for DirectVideo in the latest CVS anymore.

(AFAIK the official word from the XFree team is that DGA 1.0 should die/
is dead ;))

Still temporarily useful to get mouse deltas (I think you don’t need to
be on the local host or have root privileges to do this)…

That functionality is still in there (disabled via an option to configure:
–disable-video-x11-dga), and is automatically enabled if you set a video
mode after hiding the cursor. This is true of both windowed and fullscreen
modes.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

hi`

Pierre Phaneuf wrote:

(AFAIK the official word from the XFree team is that DGA 1.0 should die/
is dead ;))

Still temporarily useful to get mouse deltas (I think you don’t need to
be on the local host or have root privileges to do this)…

Yes, DirectMouse doesn’t require root and AFAIK works remote. But I
think it is somewhat broken. When querying for the DirectMouse part it
never returns support but works ;-)–
Daniel Vogel My opinions may have changed,
666 @ http://grafzahl.de but not the fact that I am right