SDL_Surface corruption

Hello all,

I am one of the students working in the Google Summer of Code, for
Pygame/Python, to add a newer(and better) movie module.

One of the requirements is that the module writes to a given surface, if one
is given. Another is being able to resize a window to… any size desired by
the programmer. I’ve found in my testing that when I resize the window
smaller while writing to a surface(instead of an overlay which is the normal
mode of the module), the lower portion of the window becomes corrupted.

If you take a look at this link, you’ll see what I mean:
http://oddco.ca/corruption.png

I only resized the window to 576x313(90% of its original size).

Anyone know what could be causing this issue, or any links or resources that
could help? Ask any questions, I’ll answer gladly.

Thanks in advance for any and all help,

Tyler–
Visit my blog at http://oddco.ca/zeroth/zblog

Hello all,

I am one of the students working in the Google Summer of Code, for
Pygame/Python, to add a newer(and better) movie module.

One of the requirements is that the module writes to a given surface, if
one is given. Another is being able to resize a window to… any size
desired by the programmer. I’ve found in my testing that when I resize the
window smaller while writing to a surface(instead of an overlay which is the
normal mode of the module), the lower portion of the window becomes
corrupted.

If you take a look at this link, you’ll see what I mean:
http://oddco.ca/corruption.png

I only resized the window to 576x313(90% of its original size).

Anyone know what could be causing this issue, or any links or resources
that could help? Ask any questions, I’ll answer gladly.

Thanks in advance for any and all help,

Tyler


Visit my blog at http://oddco.ca/zeroth/zblog

Hi,

do you get the screen surface new every time? Or do you reuse the one you
already have?

cheers,On Wed, Jul 8, 2009 at 8:20 AM, Tyler Laing wrote:

Hello all,

I am one of the students working in the Google Summer of Code, for
Pygame/Python, to add a newer(and better) movie module.

One of the requirements is that the module writes to a given surface, if
one is given. Another is being able to resize a window to… any size
desired by the programmer. I’ve found in my testing that when I resize the
window smaller while writing to a surface(instead of an overlay which is the
normal mode of the module), the lower portion of the window becomes
corrupted.

If you take a look at this link, you’ll see what I mean:
http://oddco.ca/corruption.png

I only resized the window to 576x313(90% of its original size).

Anyone know what could be causing this issue, or any links or resources
that could help? Ask any questions, I’ll answer gladly.

Thanks in advance for any and all help,

Tyler


Visit my blog at http://oddco.ca/zeroth/zblog

Hi,

do you get the screen surface new every time? Or do you reuse the one you
already have?

cheers,

When I resize, I set some status variables, so that I free the old
surfaces(I use a ringbuffer style queue of finished video picture
structs, which have a reference to the surfacse), check if the display
is the same size, and if not, I change the mode. Then I create a new
surface at the specified size. This is done for each video picture in
the queue, as they’re processed(so its not one big burst). The only
surface that I don’t free and resize is the one given by the
programmer. I’m thinking that might be the source of my issues,
actually. The reason I don’t free and resize it is… well, thats kind
of a bad thing to do! Its not my so why would I
discard it and replace it with a new one?

-TylerSubject: Re: [SDL] SDL_Surface corruption
On Wed, Jul 8, 2009 at 8:20 AM, Tyler Laing <@Tyler_Laing> wrote:


Visit my blog at http://oddco.ca/zeroth/zblog