SDL_HWSURFACE question

Hello all,

I’m using SDL with the SDL_OPENGL stuff, and I never seem to be able to get
a hardware surface.

Basically:

SDL_VideoInfo* vi = SDL_GetVideoInfo();
if (vi->hw_available)
{
// *** We never get here!!! ***
Flags |= SDL_HWSURFACE;
}

In case it’s relevant, this is on FC5 with the latest nVidia driver.
And here’s my “best” glx

Vis Vis Visual Trans buff lev render DB ste r g b a aux dep ste
accum buffers MS MS

ID Depth Type parent size el type reo sz sz sz sz buf th ncl
r g b a num bufs
0x23 24 TrueColor 0 32 0 rgba 1 0 8 8 8 8 4 24 8
16 16 16 16 0 0

Cheers,
K.

Hello all,

I’m using SDL with the SDL_OPENGL stuff, and I never seem to be able
to get a hardware surface.

There is no way of saying if OpenGL context has HW accelerated functions
or no. Except the running speed of course.

Basically:

SDL_VideoInfo* vi = SDL_GetVideoInfo();
if (vi->hw_available)
{
// *** We never get here!!! ***
Flags |= SDL_HWSURFACE;
}

And if you would then there would be something seriously broken in your
SDL.

The video info and SDL_HWSURFACE flag are only for the plain SDL not for
OpenGL.

It simply is not possible to check if the OpenGL implementation the
program uses is HW accelerated or not.

You can kind of get to it by looking the supported extensions etc, but
that is not perfect.

Cleanest way is to run some small tests at the start, with some heavy
test material and look from that what the real performace is.On Friday 19 May 2006 11:52, Kostas Kostiadis wrote:

I believe 1.2.10 added the SDL_GL_ACCELERATED_VISUAL flag to ensure it
is accelerated, no?On Fri, May 19, 2006 at 01:14:32PM +0300, Sami N??t?nen wrote:

On Friday 19 May 2006 11:52, Kostas Kostiadis wrote:

Hello all,

I’m using SDL with the SDL_OPENGL stuff, and I never seem to be able
to get a hardware surface.

There is no way of saying if OpenGL context has HW accelerated functions
or no. Except the running speed of course.


Steaphan Greene
Lecturer, Computer Science, Binghamton University
GPG public key: http://www.cs.binghamton.edu/~sgreene/gpg.key.txt
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060519/4d247679/attachment.pgp

That’s better than nothing, but there is certain situations where the
drivers will fall back to software rendering. At the moment this hapens
mostly when using shaders. There is so many different HW that will
support the shaders in general, but some cases can’t be HW accelerated.

So only way to know for sure is to test drive the code.

PS. For basic GL operations SDL_GL_ACCELERATED_VISUAL should be enough.On Friday 19 May 2006 16:33, Steaphan Greene wrote:

On Fri, May 19, 2006 at 01:14:32PM +0300, Sami N??t?nen wrote:

On Friday 19 May 2006 11:52, Kostas Kostiadis wrote:

Hello all,

I’m using SDL with the SDL_OPENGL stuff, and I never seem to be
able to get a hardware surface.

There is no way of saying if OpenGL context has HW accelerated
functions or no. Except the running speed of course.

I believe 1.2.10 added the SDL_GL_ACCELERATED_VISUAL flag to ensure
it is accelerated, no?