Covered before?

I searched the archives and so far have not found any recent up-to-date info on stretch blitting. I found the sdl_stretch stuff on sourceforge, but it’s not exactly what I’m looking for, which is basically a blit that completely maps the source rect to the dest rect without having to do an intermediate surface.

I’m working on a GUI system and I’m importing data from a commercial Windows theme editor into my own format. As the pieces are fitted around the window, they can either be stretched or tiled, and most of the time stretching works better.

Is there something out there already that people are using for stretching? I’m just know that if I code something up and post it here to share, Sam would respond and say "oh you mean like SDL_Stretch(…)? " (just kiddin, Sam!)

John Nagle

President/CEO
Nagle Research
13809 Research Blvd. Suite 745
Austin, TX 78750
http://www.NagleResearch.com
512.260.9533 (office)
512.300.8906 (cell)

Don’t know if it’s an option but OpenGL does stretching

I use sdl to get to opengl and it works great (:_____

From: sdl-bounces+atrix2=cox.net@libsdl.org
[mailto:sdl-bounces+atrix2=cox.net at libsdl.org] On Behalf Of John Nagle
Sent: Monday, March 13, 2006 8:25 PM
To: A list for developers using the SDL library. (includesSDL-announce)
Subject: [SDL] Covered before?

I searched the archives and so far have not found any recent up-to-date info
on stretch blitting. I found the sdl_stretch stuff on sourceforge, but it’s
not exactly what I’m looking for, which is basically a blit that completely
maps the source rect to the dest rect without having to do an intermediate
surface.

I’m working on a GUI system and I’m importing data from a commercial Windows
theme editor into my own format. As the pieces are fitted around the
window, they can either be stretched or tiled, and most of the time
stretching works better.

Is there something out there already that people are using for stretching?
I’m just know that if I code something up and post it here to share, Sam
would respond and say "oh you mean like SDL_Stretch(…)? " (just
kiddin, Sam!)

John Nagle

President/CEO
Nagle Research
13809 Research Blvd. Suite 745
Austin, TX 78750
http://www.NagleResearch.com
512.260.9533 (office)
512.300.8906 (cell)

It is an option, but a last resort…I really am trying to stick to the DirectX implementation under Windows; many of my users will have older machines and probably software-only OpenGL drivers, whereas they’ll probably have good performance with DirectX.

-John----- Original Message -----
From: Alan Wolfe
To: 'A list for developers using the SDL library. (includesSDL-announce)'
Sent: Monday, March 13, 2006 10:30 PM
Subject: Re: [SDL] Covered before?

Don’t know if it’s an option but OpenGL does stretching

I use sdl to get to opengl and it works great (:


From: sdl-bounces+atrix2=cox.net at libsdl.org [mailto:sdl-bounces+atrix2=cox.net at libsdl.org] On Behalf Of John Nagle
Sent: Monday, March 13, 2006 8:25 PM
To: A list for developers using the SDL library. (includesSDL-announce)
Subject: [SDL] Covered before?

I searched the archives and so far have not found any recent up-to-date info on stretch blitting. I found the sdl_stretch stuff on sourceforge, but it’s not exactly what I’m looking for, which is basically a blit that completely maps the source rect to the dest rect without having to do an intermediate surface.

I’m working on a GUI system and I’m importing data from a commercial Windows theme editor into my own format. As the pieces are fitted around the window, they can either be stretched or tiled, and most of the time stretching works better.

Is there something out there already that people are using for stretching? I’m just know that if I code something up and post it here to share, Sam would respond and say "oh you mean like SDL_Stretch(…)? " (just kiddin, Sam!)

John Nagle

President/CEO
Nagle Research
13809 Research Blvd. Suite 745
Austin, TX 78750
http://www.NagleResearch.com
512.260.9533 (office)
512.300.8906 (cell)



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

Hello John,

Tuesday, March 14, 2006, 4:38:32 AM, you wrote:

JN> It is an option, but a last resort…I really am trying to stick
JN> to the DirectX implementation under Windows; many of my users will
JN> have older machines and probably software-only OpenGL drivers,
JN> whereas they’ll probably have good performance with DirectX.

SDL currently doesn’t use hardware to do stretch blitting.

JN> I searched the archives and so far have not found any recent
JN> up-to-date info on stretch blitting. I found the sdl_stretch
JN> stuff on sourceforge, but it’s not exactly what I’m looking for,
JN> which is basically a blit that completely maps the source rect to
JN> the dest rect without having to do an intermediate surface.

SDL_stretch is now in SDL itself. It will work source->dest as you
require. The only catch is the surfaces must be of the same bit depth.

I know it says “Not in public API - do not use!” but I suspect
everyone will. It’s the right place for this function to be.

extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface *src, SDL_Rect *srcrect,
SDL_Surface *dst, SDL_Rect *dstrect);

IMO this function should be in SDL, and should stay here. In the
future it should be made to make use of hardware acceleration if
possible.–
Best regards,
Peter mailto:@Peter_Mulholland

Excellent, thanks Peter, that’s good advice. I’ll use that for now.

-John> ----- Original Message -----

From: darkmatter@freeuk.com (Peter Mulholland)
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Monday, March 13, 2006 10:46 PM
Subject: Re: [SDL] Covered before?

Hello John,

Tuesday, March 14, 2006, 4:38:32 AM, you wrote:

JN> It is an option, but a last resort…I really am trying to stick
JN> to the DirectX implementation under Windows; many of my users will
JN> have older machines and probably software-only OpenGL drivers,
JN> whereas they’ll probably have good performance with DirectX.

SDL currently doesn’t use hardware to do stretch blitting.

JN> I searched the archives and so far have not found any recent
JN> up-to-date info on stretch blitting. I found the sdl_stretch
JN> stuff on sourceforge, but it’s not exactly what I’m looking for,
JN> which is basically a blit that completely maps the source rect to
JN> the dest rect without having to do an intermediate surface.

SDL_stretch is now in SDL itself. It will work source->dest as you
require. The only catch is the surfaces must be of the same bit depth.

I know it says “Not in public API - do not use!” but I suspect
everyone will. It’s the right place for this function to be.

extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface *src, SDL_Rect
*srcrect,
SDL_Surface *dst, SDL_Rect *dstrect);

IMO this function should be in SDL, and should stay here. In the
future it should be made to make use of hardware acceleration if
possible.


Best regards,
Peter mailto:darkmatter at freeuk.com


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

IMO this function should be in SDL, and should stay here. In the
future it should be made to make use of hardware acceleration if
possible.

I agree, manipulating images is very important, stretching is possibly
one of the most important image manipulation that we need for any kind
of operations. This is something that everybody will definately need
to use at some point.

Simon

Unfortunately, I get nothing when I call it. I’ve checked my coordinates
and they all seem good. I’ve also tried with and without locking the
surface before the call, but I get nothing. I don’t currently have the SDL
sources to debug this…but sounds like you (Simon) and Peter have both used
it before with success. Any ideas? Could it have anything to do with the
fact that I’m blitting just a portion of my source surface?

-John> ----- Original Message -----

From: simon.xhz@gmail.com (Simon)
To: “Peter Mulholland” ; “A list for developers using
the SDL library. (includes SDL-announce)”
Sent: Monday, March 13, 2006 11:21 PM
Subject: Re: [SDL] Covered before?

IMO this function should be in SDL, and should stay here. In the
future it should be made to make use of hardware acceleration if
possible.

I agree, manipulating images is very important, stretching is possibly
one of the most important image manipulation that we need for any kind
of operations. This is something that everybody will definately need
to use at some point.

Simon


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

I used it only once, and didn’t like the way to use it… it’s a bit
complicated and doesn’t work like the real blitting function…

The first Rect that you have specifies the clipping rect in src image
(i think) and the second rect will only use the 2 first values as
new_width and new_height (or something like that).

It is very important to have the exact same image format, not just
same bit depth.

I erased the code that I had done as I really didn’t like using it and
went on to OpenGL. I’ve had great answers from the folks on IRC about
this a couple months ago.

HTH,
SimonOn 3/14/06, John Nagle wrote:

Unfortunately, I get nothing when I call it. I’ve checked my coordinates
and they all seem good. I’ve also tried with and without locking the
surface before the call, but I get nothing. I don’t currently have the SDL
sources to debug this…but sounds like you (Simon) and Peter have both used
it before with success. Any ideas? Could it have anything to do with the
fact that I’m blitting just a portion of my source surface?