Bug in blitting?

Hi all,

I’m having trouble using SDL_BlitSurface…

Let’s explain:

I have primary surface, for example 800x600x16 bit opened using
SDL_SetVideoMode(), and then another surface for example 200x200x16bit. I
will my second surface with data for example but when I blit it to coords
100,100 into primary surface it appears at coords 0,0 … I have correctly
set srcrect and dstrect and this happens with both SW_SURFACE and with
HW_SURFACE…

What’s wrong? I hope I can blit from different sized surfaces…

Regards, Pavel Kanzelsberger

Hi all,

I’m having trouble using SDL_BlitSurface…

Let’s explain:

I have primary surface, for example 800x600x16 bit opened using
SDL_SetVideoMode(), and then another surface for example 200x200x16bit. I
will my second surface with data for example but when I blit it to coords
100,100 into primary surface it appears at coords 0,0 … I have correctly
set srcrect and dstrect and this happens with both SW_SURFACE and with
HW_SURFACE…

What’s wrong? I hope I can blit from different sized surfaces…

It would help if you showed us your code.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

I have primary surface, for example 800x600x16 bit opened using
SDL_SetVideoMode(), and then another surface for example 200x200x16bit. I
will my second surface with data for example but when I blit it to coords
100,100 into primary surface it appears at coords 0,0 … I have correctly
set srcrect and dstrect and this happens with both SW_SURFACE and with
HW_SURFACE…

What’s wrong? I hope I can blit from different sized surfaces…

Hard to say without seeing the code, don’t you think?

Are you sure you’ve set destination correctly? I have no such
trouble whatsoever … And yes, you can blit from differently
sized surfaces, and you can blit only parts of surface to part of
other surface. I do that, It works perfectly fine.

regards,
Pallav.On Mon, 10 Feb 2003, Kanzelsberger Pavel wrote:


You are only young once, but you can stay immature indefinitely.


| |
|Pallav Nawani |
|Sasken Communication Technologies Ltd. |
|Domlur, Bangalore. |
|_______________________________________________________________|

Hi,

I’m really sorry, I’ve found it’s my fault. Some other code was
rewriting my surface handle in memory :frowning:

Thanks, Pavel Kanzelsberger> ----- Original Message -----

From: Sam Lantinga [mailto:slouken@devolution.com]
Sent: Wednesday, February 12, 2003 5:23 AM
To: sdl at libsdl.org
Subject: Re: [SDL] Bug in blitting?

Hi all,

I’m having trouble using SDL_BlitSurface…

Let’s explain:

I have primary surface, for example 800x600x16 bit opened using
SDL_SetVideoMode(), and then another surface for example
200x200x16bit. I will my second surface with data for example but when

I blit it to coords 100,100 into primary surface it appears at coords
0,0 … I have correctly set srcrect and dstrect and this happens with

both SW_SURFACE and with HW_SURFACE…

What’s wrong? I hope I can blit from different sized surfaces…

It would help if you showed us your code.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment


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