SDL_ConvertSurface losing information on alpha?

Hello,
i updated SDL to the latest version on Mac, and i came across the BGR/RGB
conversion due to the switch to ImageIO in SDL_image.
I found this forum thread that explained very well what to do (even though
is was for BMP while i use PNG):
http://www.idevgames.com/forum/showpost.php?p=85954&postcount=9

So i used SDL_ConvertSurface() to update the surface that is created from
the IMG_Loda() with a proper pixel format

SDL_PixelFormat format = {NULL, 32, 4, 0, 0, 0, 0, 0, 8, 16, 24,
0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000, 0, 255};

and normal images were loaded very well! However i noticed that every image
that had transparency (eg. faded into the background) was no more
transparent!
i’ve tried in any way i knew, but i couldn’t make head or tails of this!

can anyone help me?
Thanks
Vittorio–

Pablo Picassohttp://www.brainyquote.com/quotes/authors/p/pablo_picasso.html

  • “Computers are useless. They can only give you answers.”

Did you try SDL_DisplayFormatAlpha() instead?On Wed, Oct 21, 2009 at 8:35 PM, Vittorio G. <vitto.giova at yahoo.it> wrote:

Hello,
i updated SDL to the latest version on Mac, and i came across the BGR/RGB
conversion due to the switch to ImageIO in SDL_image.
I found this forum thread that explained very well what to do (even though
is was for BMP while i use PNG):
http://www.idevgames.com/forum/showpost.php?p=85954&postcount=9

So i used SDL_ConvertSurface() to update the surface that is created from
the IMG_Loda() with a proper pixel format

SDL_PixelFormat format = {NULL, 32, 4, 0, 0, 0, 0, 0, 8, 16, 24, 0x000000FF,
0x0000FF00, 0x00FF0000, 0xFF000000, 0, 255};

and normal images were loaded very well! However i noticed that every image
that had transparency (eg. faded into the background) was no more
transparent!
i’ve tried in any way i knew, but i couldn’t make head or tails of this!

can anyone help me?
Thanks
Vittorio

Pablo Picasso ?- “Computers are useless. They can only give you answers.”


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

Yes i tried that but perhaps in a wrong way
here’s what i tried

call SDL_ConvertSurface and then SDL_DisplayFormatAlpha -> switch again red
and blue channels (wrong result)
directly call SDL_DisplayFormatAlpha -> the red and blue channel are not
swapped (wrong result)
try to hack the format of the surface loaded with img_load, image.format=
convertedFormat -> some very weird color distortion (wrong result)

plus in all three cases alpha was not applied
i could post images if needed
VittorioOn Thu, Oct 22, 2009 at 6:49 AM, Sam Lantinga wrote:

Did you try SDL_DisplayFormatAlpha() instead?

On Wed, Oct 21, 2009 at 8:35 PM, Vittorio G. <vitto.giova at yahoo.it> wrote:

Hello,
i updated SDL to the latest version on Mac, and i came across the BGR/RGB
conversion due to the switch to ImageIO in SDL_image.
I found this forum thread that explained very well what to do (even
though
is was for BMP while i use PNG):
http://www.idevgames.com/forum/showpost.php?p=85954&postcount=9

So i used SDL_ConvertSurface() to update the surface that is created from
the IMG_Loda() with a proper pixel format

SDL_PixelFormat format = {NULL, 32, 4, 0, 0, 0, 0, 0, 8, 16, 24,
0x000000FF,
0x0000FF00, 0x00FF0000, 0xFF000000, 0, 255};

and normal images were loaded very well! However i noticed that every
image
that had transparency (eg. faded into the background) was no more
transparent!
i’ve tried in any way i knew, but i couldn’t make head or tails of this!

can anyone help me?
Thanks
Vittorio

Pablo Picasso - “Computers are useless. They can only give you answers.”


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Joan Crawfordhttp://www.brainyquote.com/quotes/authors/j/joan_crawford.html

  • “I, Joan Crawford, I believe in the dollar. Everything I earn, I
    spend.”

have you tried this?

SDL_Surface* tmp;
SDL_Surface* img;
SDL_PixelFormat f = {0};

SDL_PixelFormatEnumToMasks(
SDL_ARRAYORDER_BGRA, /* or SDL_ARRAYORDER_ABGR /
&f.BitsPerPixel,
&f.Rmask,
&f.Gmask,
&f.Bmask,
&f.Amask
);
/
other format fields are ignored anyway for conversion */

tmp = IMG_Load(“myimage.png”);
img = SDL_ConvertSurface(tmp, f, 0);
SDL_FreeSurface(tmp);

/* do stuff with img… */

i was going to try it but then i discovered it was only for sdl 1.3
i need something compatible in both 1.2 and 1.3
what can i do?
vittorioOn Fri, Oct 23, 2009 at 5:07 AM, Kenneth Bull wrote:

have you tried this?

SDL_Surface* tmp;
SDL_Surface* img;
SDL_PixelFormat f = {0};

SDL_PixelFormatEnumToMasks(
SDL_ARRAYORDER_BGRA, /* or SDL_ARRAYORDER_ABGR /
&f.BitsPerPixel,
&f.Rmask,
&f.Gmask,
&f.Bmask,
&f.Amask
);
/
other format fields are ignored anyway for conversion */

tmp = IMG_Load(“myimage.png”);
img = SDL_ConvertSurface(tmp, f, 0);
SDL_FreeSurface(tmp);

/* do stuff with img… */


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Stephen Leacockhttp://www.brainyquote.com/quotes/authors/s/stephen_leacock.html

  • “I detest life-insurance agents: they always argue that I shall some
    day
    die, which is not so.”

2009/10/23 Vittorio G. <vitto.giova at yahoo.it>:

i was going to try it but then i discovered it was only for sdl 1.3
i need something compatible in both 1.2 and 1.3
what can i do?

If this doesn’t work…

SDL_Surface* tmp;
SDL_Surface* img;

tmp = IMG_Load(“myimage.png”);
img = SDL_DisplayFormatAlpha(tmp);
SDL_FreeSurface(tmp);

/* do stuff with img */

… then check your source image, submit a bug report and use this temporarily:

Uint32 tmpmask;

tmpmask = img.format.Rmask;
img.format.Rmask = img.format.Bmask;
img.format.Bmask = tmpmask;

(and similar for loss and shift).

That is, if red and blue are swapped, swap them back.

I’ve filed a bug here: http://bugzilla.libsdl.org/show_bug.cgi?id=868
we’ve discovered that basically alpha works only if alpha color is red… my
suspect is that red and alpha channel get somehow swapped during blending
VittorioOn Sat, Oct 24, 2009 at 2:22 AM, Kenneth Bull wrote:

2009/10/23 Vittorio G. <vitto.giova at yahoo.it>:

i was going to try it but then i discovered it was only for sdl 1.3
i need something compatible in both 1.2 and 1.3
what can i do?

If this doesn’t work…

SDL_Surface* tmp;
SDL_Surface* img;

tmp = IMG_Load(“myimage.png”);
img = SDL_DisplayFormatAlpha(tmp);
SDL_FreeSurface(tmp);

/* do stuff with img */

… then check your source image, submit a bug report and use this
temporarily:

Uint32 tmpmask;

tmpmask = img.format.Rmask;
img.format.Rmask = img.format.Bmask;
img.format.Bmask = tmpmask;

(and similar for loss and shift).

That is, if red and blue are swapped, swap them back.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Joan Crawfordhttp://www.brainyquote.com/quotes/authors/j/joan_crawford.html

  • “I, Joan Crawford, I believe in the dollar. Everything I earn, I
    spend.”

I’ve filed a bug here: http://bugzilla.libsdl.org/show_bug.cgi?id=868
we’ve discovered that basically alpha works only if alpha color is red… my
suspect is that red and alpha channel get somehow swapped during blending
Vittorio

2009/10/23 Vittorio G. <vitto.giova at yahoo.it>:

i was going to try it but then i discovered it was only for sdl 1.3
i need something compatible in both 1.2 and 1.3
what can i do?

If this doesn’t work…

SDL_Surface* tmp;
SDL_Surface* img;

tmp = IMG_Load(“myimage.png”);
img = SDL_DisplayFormatAlpha(tmp);
SDL_FreeSurface(tmp);

/* do stuff with img */

… then check your source image, submit a bug report and use this
temporarily:

Uint32 tmpmask;

tmpmask = img.format.Rmask;
img.format.Rmask = img.format.Bmask;
img.format.Bmask = tmpmask;

(and similar for loss and shift).

That is, if red and blue are swapped, swap them back.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Joan Crawford ?- “I, Joan Crawford, I believe in the dollar. Everything I
earn, I spend.”


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

hi,

Is there a way to build using the normal SDL_image stuff on OSX?
Considering this bug, and for consistency with other platforms I’d
like to do that.

That is probably a good work around for it… if it’s possible.

cu,On Thu, Oct 29, 2009 at 3:13 PM, Vittorio G. <vitto.giova at yahoo.it> wrote:

On Sat, Oct 24, 2009 at 2:22 AM, Kenneth Bull wrote:

yes, you can still use the old backend but it’s not a real solution
plus on the iphone you can’t use other backends at all so the problem still
applies

VittorioOn Thu, Oct 29, 2009 at 7:34 PM, Ren? Dudfield wrote:

On Thu, Oct 29, 2009 at 3:13 PM, Vittorio G. <vitto.giova at yahoo.it> wrote:

I’ve filed a bug here: http://bugzilla.libsdl.org/show_bug.cgi?id=868
we’ve discovered that basically alpha works only if alpha color is red…
my
suspect is that red and alpha channel get somehow swapped during blending
Vittorio

On Sat, Oct 24, 2009 at 2:22 AM, Kenneth Bull wrote:

2009/10/23 Vittorio G. <vitto.giova at yahoo.it>:

i was going to try it but then i discovered it was only for sdl 1.3
i need something compatible in both 1.2 and 1.3
what can i do?

If this doesn’t work…

SDL_Surface* tmp;
SDL_Surface* img;

tmp = IMG_Load(“myimage.png”);
img = SDL_DisplayFormatAlpha(tmp);
SDL_FreeSurface(tmp);

/* do stuff with img */

… then check your source image, submit a bug report and use this
temporarily:

Uint32 tmpmask;

tmpmask = img.format.Rmask;
img.format.Rmask = img.format.Bmask;
img.format.Bmask = tmpmask;

(and similar for loss and shift).

That is, if red and blue are swapped, swap them back.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Joan Crawford - “I, Joan Crawford, I believe in the dollar. Everything I
earn, I spend.”


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

hi,

Is there a way to build using the normal SDL_image stuff on OSX?
Considering this bug, and for consistency with other platforms I’d
like to do that.

That is probably a good work around for it… if it’s possible.

cu,


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Marie von Ebner-Eschenbachhttp://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html

  • “Even a stopped clock is right twice a day.”

hello:

how can i call a function from a timer using a SDL_UserEvent, i know how this
work but what i don’t know is how to connect the function to the SDL_UserEvent.

In your event loop, you watch for events of type ‘SDL_USEREVENT’.

If… I understand your question. (Which I might not.)On Thu, Oct 29, 2009 at 03:47:43PM -0500, Leonel Flor?n Selles wrote:

hello:

how can i call a function from a timer using a SDL_UserEvent, i know how this
work but what i don’t know is how to connect the function to the SDL_UserEvent.


-bill!
Sent from my computer

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Leonel Flor?n Selles wrote:

how can i call a function from a timer using a SDL_UserEvent, i know how this
work but what i don’t know is how to connect the function to the SDL_UserEvent.

There are two parts to this solution:

  1. Set up the timer. When the timer fires, don’t actually invoke the function in
    the timer callback. Instead, you push an user event into the queue with a code
    (SDL_UserEvent.code) that you somehow associate with the function that you want
    to call. This schedules the actual work to be done for later. (The “hard IRQ.”)
    You could do this with a kind of manager module or #define’s. (I’m not offering
    judgment whether these are good methods or not.)

  2. In your event loop, you check for user events. When you find one, examine its
    code and call the function that you earlier identified, optionally with
    parameters provided. (The “soft IRQ.”)

This approach is similar to the top-half-bottom-half approach in operating
systems, where the top half “actually responds to the hardware interrupt and a
bottom half (or “soft” irq) that is scheduled by the top half to do additional
processing.” (http://lwn.net/Articles/302043/)


  • -- Christopher C. Eineke -- Email: chris at chriseineke.com -*-
  • -- Independent Software Developer -- Cell: 1-519-852-3409 -*-
  • -- -- Home: 1-226-663-3651 -*-
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREKAAYFAkrqHwQACgkQPOmqd0kEEbu4IgCgm7LDOpW5vCxW74Rzs3pgZj2r
nNQAoM665vSyP/xFrxgW/+usqHW3rUtl
=p4wL
-----END PGP SIGNATURE-----

Ren? Dudfield wrote:> On Thu, Oct 29, 2009 at 3:13 PM, Vittorio G. <vitto.giova at yahoo.it> wrote:

I’ve filed a bug here: http://bugzilla.libsdl.org/show_bug.cgi?id=868
we’ve discovered that basically alpha works only if alpha color is red… my
suspect is that red and alpha channel get somehow swapped during blending
Vittorio

hi,

Is there a way to build using the normal SDL_image stuff on OSX?
Considering this bug, and for consistency with other platforms I’d
like to do that.

That is probably a good work around for it… if it’s possible.

cu,

Hey. Turns out the problem was a bit weirder than someone simply messing up RGBA vs ABGR.
http://forums.libsdl.org/viewtopic.php?p=20011#20011

Well friends, i’ll going to repeat the question, I have a callback function
where I want to call an other function, and I want do that from SDL_UserEvent,
but what i know is that SDL_UserEvent is an structure that have 4 kind of data
or more

SDL_UserEvent -> type
SDL_UserEvent -> code
SDL_UserEvent -> void * data1
SDL_UserEvent -> void * data2

and the last one i don’t remember, well how using this i can connect this
UserEvent with a function.> On Thu, Oct 29, 2009 at 03:47:43PM -0500, Leonel Flor?n Selles wrote:

hello:

how can i call a function from a timer using a SDL_UserEvent, i know how this
work but what i don’t know is how to connect the function to the
SDL_UserEvent.

In your event loop, you watch for events of type ‘SDL_USEREVENT’.

If… I understand your question. (Which I might not.)


-bill!
Sent from my computer


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Leonel Flor?n Selles wrote:

Well friends, i’ll going to repeat the question, I have a callback function
where I want to call an other function, and I want do that from SDL_UserEvent,
but what i know is that SDL_UserEvent is an structure that have 4 kind of data
or more

SDL_UserEvent -> type
SDL_UserEvent -> code
SDL_UserEvent -> void * data1
SDL_UserEvent -> void * data2

and the last one i don’t remember, well how using this i can connect this
UserEvent with a function.

In C, you may cast the pointer to the function to a void*, but you must ensure
that when you “recover” the pointer to the function its signature is the same
(see items 766-768 @ http://c0x.coding-guidelines.com/6.3.2.3.html):

#include <stdio.h>
int foo(int bar) { return bar; }
int main()
{
void* function = &foo;
int (*fooz)(int) = function;
printf(“3 == %d\n”, fooz(3));
return 0;
}

In C++, you need to add the (in-)appropriate casts:
#include <stdio.h>
int foo(int bar) { return bar; }
int main()
{
void* function = reinterpret_cast<void*>(&foo);
int (fooz)(int) = reinterpret_cast<int ()(int)>(function);
printf(“3 == %d\n”, fooz(3));
return 0;
}

But that’s like sledgehammering a rose petal. You’re completely foregoing type
safety and it’s a nightmare to debug. And on-top, it doesn’t work for class methods.

One approach is to store instances that adhere to an interface in a vector
somewhere:

#include
struct IEvtCB
{
virtual int bar(void*, void*) = 0;
};
struct EvtCB_1 : public IEvtCB
{
virtual int foo(void*, void*) { return bar; }
};

std::vector<EvtCB_1*> vec;

int main()
{
vec.push_back(new EvtCB_1());
return 0;
}

then find the corresponding instance in the vector and invoke the the method in
question:

/* … */

if (evt.type == SDL_USEREVENT) {
if (evt.user.code > -1) {
IEvtCB& cb = vec[evt.user.code];
int ret = cb.bar(evt.user.data1, evt.user.data2);
}
else {
/* something’s amiss */
}
}

/* … */

Another way is to use a functor (google it) that encapsulates the function or
method call and that you can then store in data1 or data2 and cast back to a
functor later on.


  • -- Christopher C. Eineke -- Email: chris at chriseineke.com -*-
  • -- Independent Software Developer -- Cell: 1-519-852-3409 -*-
  • -- -- Home: 1-226-663-3651 -*-
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREKAAYFAkrqWhgACgkQPOmqd0kEEbtvAwCgpVEFBdecm+I97Xc1Dym6bwvZ
J2gAoIv9191GdGVU3n1veJhYRjx2q5Kz
=Zexz
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Leonel Flor?n Selles wrote:

Well friends, i’ll going to repeat the question, I have a callback function
where I want to call an other function, and I want do that from SDL_UserEvent,
but what i know is that SDL_UserEvent is an structure that have 4 kind of data
or more

SDL_UserEvent -> type
SDL_UserEvent -> code
SDL_UserEvent -> void * data1
SDL_UserEvent -> void * data2

and the last one i don’t remember, well how using this i can connect this
UserEvent with a function.

In C, you may cast the pointer to the function to a void*, but you must ensure
that when you “recover” the pointer to the function its signature is the same
(see items 766-768 @ http://c0x.coding-guidelines.com/6.3.2.3.html):

In C++, you need to add the (in-)appropriate casts:

But that’s like sledgehammering a rose petal. You’re completely foregoing type
safety and it’s a nightmare to debug. And on-top, it doesn’t work for class methods.

Hmm. In Delphi, a method pointer is represented by a record (struct) composed of
two pointers: one to the function and one to the object instance. I notice the
SDL_UserEvent struct here has two miscellaneous data pointers for general
use. I don’t know too much about C++ method pointers, but is there any way
you could use them for that purpose?>----- Original Message ----

From: Christopher Eineke
Subject: Re: [SDL] using SDL_UserEvent with SDL_timer

C++ member function pointers are tricky beasts. For one thing, they
aren’t required to be the same size as a void pointer. In fact, they
often are 8 or 16 bytes on 32 bit compilers. You can wrap them in a
struct with a virtual function, and use template hackery to generate
the boilerplate (or use boost::function<>). For simpler tasks, you can
wrap the member function in a free function:

template<class T, void (T::*function)()>
void wrapper( T *instance)
{

((instance) ->* (function)) ();
}

This would require more work to support varying return types and
parameters, but for one or two of each it might be a simpler
alternative to boost::function.

Still, technically I believe casting any function to void * is
illegal, at least in C++:
http://www.parashift.com/c++-faq-lite/pointers-to-members.html#faq-33.8On Fri, Oct 30, 2009 at 3:33 AM, Mason Wheeler wrote:

Hmm. ?In Delphi, a method pointer is represented by a record (struct) composed of
two pointers: one to the function and one to the object instance. ?I notice the
SDL_UserEvent struct here has two miscellaneous data pointers for general
use. ?I don’t know too much about C++ method pointers, but is there any way
you could use them for that purpose?

Christopher Eineke wrote:

There are two parts to this solution:

  1. Set up the timer. When the timer fires, don’t actually invoke the function in
    the timer callback. Instead, you push an user event into the queue with a code
    (SDL_UserEvent.code) that you somehow associate with the function that you want
    to call. This schedules the actual work to be done for later. (The “hard IRQ.”)
    You could do this with a kind of manager module or #define’s. (I’m not offering
    judgment whether these are good methods or not.)

  2. In your event loop, you check for user events. When you find one, examine its
    code and call the function that you earlier identified, optionally with
    parameters provided. (The “soft IRQ.”)

I’ve been using this method. But, when I try it with SDL 1.3, although it works nicely for a constant-sized window, it fails with an access violation (consistently at location FFFFFFFF) when resizing the window.

I’ve noticed that while you are dragging the window border events are inhibited until you release the mouse button. Then a flock of resize event sequences or (resize, expose) sequences (depending on whether you’re making the window smaller or larger, respectively) become available in the SDL event queue. I’m firing the timer every three seconds, and it seems like the failure may be occurring when the timer fires. The timer callback function isn’t the culprit because it works fine when I’m not resizing.

Because all the resize events are batched, I am unable to work around this problem.

Any suggestions?

Well, just off the top of my head, an AV at $FFFFFFFF is a null pointer dereference. It’s trying to access something at offset -1 from the pointer’s location. Look for some object that gets freed while the window’s being resized and then recreated afterwards.________________________________
From: waltniehoff@stny.rr.com (Walt Niehoff)
To: sdl at lists.libsdl.org
Sent: Wed, November 11, 2009 11:44:52 AM
Subject: Re: [SDL] using SDL_UserEvent with SDL_timer

Christopher Eineke wrote:

There are two parts to this solution:

  1. Set up the timer. When the timer fires, don’t actually invoke the function in
    the timer callback. Instead, you push an user event into the queue with a code
    (SDL_UserEvent.code) that you somehow associate with the function that you want
    to call. This schedules the actual work to be done for later. (The “hard IRQ.”)
    You could do this with a kind of manager module or #define’s. (I’m not offering
    judgment whether these are good methods or not.)

  2. In your event loop, you check for user events. When you find one, examine its
    code and call the function that you earlier identified, optionally with
    parameters provided. (The “soft IRQ.”)

I’ve been using this method. But, when I try it with SDL 1.3, although it works nicely for a constant-sized window, it fails with an access violation (consistently at location FFFFFFFF) when resizing the window.

I’ve noticed that while you are dragging the window border events are inhibited until you release the mouse button. Then a flock of resize event sequences or (resize, expose) sequences (depending on whether you’re making the window smaller or larger, respectively) become available in the SDL event queue. I’m firing the timer every three seconds, and it seems like the failure may be occurring when the timer fires. The timer callback function isn’t the culprit because it works fine when I’m not resizing.

Because all the resize events are batched, I am unable to work around this problem.

Any suggestions?

Mason Wheeler wrote:

Well, just off the top of my head, an AV at $FFFFFFFF is a null pointer dereference. It’s trying to access something at offset -1 from the pointer’s location. Look for some object that gets freed while the window’s being resized and then recreated afterwards.

Unfortunately, although it’s constant at location FFFFFFFF on my system, it’s at 10299D2F on a buddy’s.

I should add that if I (via a control block) tell the timer callback to bypass pushing a user event onto the queue, the failure does not occur. But, of course, I’ve lost my only element of control – the user event. I’ll have to take a look at the bowels of the SDL 1.3 timer event handling code to see if I can spot anything.

Is there any SDL 1.3 event that comes back to the SDL event queue (the one that’s accessable via the API) WHILE the border is actually being dragged? (Note that my posting above points out that resize and possibly expose events are batched and made available after the window border is released.)