Display format?

Hi,

Is there any way I can predict the display format before seting a video mode for the first time?
I want to pre-load a set of surfaces that I’m going to blit to the screen, before creating the screen, and in the screen’s format.

Any advices?

Thanks,
Thiago

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Why not show a splash/loading-screen while doing that. this way you can create
your screen first. also, if you app is windowed, first show a splashscreen,
than load you stuff, and finally create the final surface. if both is
windowed the splash and the final-screen should have the same format.Am Freitag, 21. Februar 2003 23:10 schrieb Thiago Bastos:

Hi,

Is there any way I can predict the display format before seting a video
mode for the first time? I want to pre-load a set of surfaces that I’m
going to blit to the screen, before creating the screen, and in the
screen’s format.

Any advices?

Thanks,
Thiago


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


Matthias Bach | GPG/PGP-Key-ID: 0xACA73EC9
www.marix-world.de | On Keyserver: www.keyserver.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+V2WOlnJmS6ynPskRAqXHAJ0ab+MZ/PH56h2ZobNMyCR49ru5IACfR/6U
1FEX6YB04sqolJ0uEutkDlA=
=yPtM
-----END PGP SIGNATURE-----

Thiago Bastos wrote:

Hi,

Is there any way I can predict the display format before seting a video mode for the first time?
I want to pre-load a set of surfaces that I’m going to blit to the screen, before creating the screen, and in the screen’s format.

Any advices?

Thanks,
Thiago

Cant you list the available modes and then just use one of those?

Why not show a splash/loading-screen while doing that. this way you can create
your screen first. also, if you app is windowed, first show a splashscreen,
than load you stuff, and finally create the final surface. if both is
windowed the splash and the final-screen should have the same format.

That idea would be perfect if I was developing an application.
However I’m developing a framework that works as an abstraction layer for VR applications, splash screens are disallowed.

Cant you list the available modes and then just use one of those?

Well, I assumed that wouldn’t give me the same optimizations SDL_DisplayFormat() does, specially for bliting to an OPENGLBLIT surface.
I can tell the SDL to create a 32bits screen, but I can’t predict which is the most optimized color format for the local system.
Then I read at the SDL changelog that what the SDL_HWSURFACE flag does is create a surface using the display format. I’m not sure if that’s really true, but I’m using SDL_HWSURFACE with all my surfaces now. Comments? :o)

And one more question, please:
SDL is relatively new to me, and I found the OPENGLBLIT feature very interesting. It’s much easier to blit 2D images to the screen than using an ortho projection and textures. I’m using it to display text on the screen. But the late SDL versions are saying that feature is deprecated, and that I should use the second mentioned method instead of OPENGLBLIT. Why is that? What are the drawbacks of OPENGLBLIT?

If it’s really a hack to blit into the framebuffer, the only drawback I can think of is portability. If so, how portable is OPENGLBLIT currently? I need it to work on IRIX :o)

Thanks again,
Thiago