adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] Mac Gui Problems ... and a workaround


From: Kai Sterker
Subject: Re: [Adonthell-devel] Mac Gui Problems ... and a workaround
Date: Mon, 16 Feb 2009 22:09:00 +0100

On Mon, Feb 16, 2009 at 11:39 AM, Kai Sterker <address@hidden> wrote:
> On Mon, Feb 16, 2009 at 10:29 AM, Kai Sterker <address@hidden> wrote:
>
>> I might have to add some debug info about the properties of the screen
>> surface we actually get on OSX and compare that with Linux/Win32.
>
> Here's what I get on Windows:

And that on OSX

Video information:
Video driver used:                   Quartz
Internal game depth:                 32
Can create hardware surfaces:        No
Window manager available:            Yes
Hardware blits accelerated:          No
Colorkey hardware blits accelerated: No
Alpha hardware blits accelerated:    No
Software blits accelerated:          No
Colorkey software blits accelerated: No
Alpha software blits accelerated:    No
Color fill blits accelerated:        No
Total video memory available:        0 Kb
Fullscreen:                          No
Alpha value:                         255

Actually, it occurred to me that I can do export SDL_VIDEODRIVER=X11
on the Mac too. And guess what. Runs without problems, just like on
Linux. Output is pretty much the same:

Tenebrae:~/adonthell/adonthell-build/test kai$ export SDL_VIDEODRIVER=X11
Tenebrae:~/adonthell/adonthell-build/test kai$ export DISPLAY=:0.0
Tenebrae:~/adonthell/adonthell-build/test kai$ .libs/guitest -g
../../adonthell/test/
Video information:
Video driver used:                   x11
Internal game depth:                 32
Can create hardware surfaces:        No
Window manager available:            Yes
Hardware blits accelerated:          No
Colorkey hardware blits accelerated: No
Alpha hardware blits accelerated:    No
Software blits accelerated:          No
Colorkey software blits accelerated: No
Alpha software blits accelerated:    No
Color fill blits accelerated:        No
Total video memory available:        0 Kb
Fullscreen:                          No
Alpha value:                         255

Then I went and wrote a little test that loads a PNG with alpha
channel (using SDL_Image) and draw that on a white screen surface.
Works like a charm too. See the attached file for the test code.
Compiles with

gcc -o graywin graywin.c -g -O2 -I/usr/local/include/SDL
-D_GNU_SOURCE=1 -D_THREAD_SAFE -I/usr/X11R6/include -DHAVE_OPENGL
-L/usr/local/lib -lSDLmain -lSDL -lSDL_image -Wl,-framework,Cocoa

Since I couldn't figure out any more, I've posted something to the SDL
mailing list too, in the hope that maybe folks there can shed some
light on this. Having a small working test case would be beneficial,
however.

Kai

Attachment: graywin.c
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]