SDL 1.3 scaling

Nate

Yeah that occurred to me also - definately cheaper and probably better in some ways, but if I can do it in software then all the better.

I looked at that SetRenderTarget also, and came to the same conclusion.

Thanks for your efforts looking at this, I actually emailed Sam about me funding the implementation of this, for eventual release to the community, though of course he’s
busy moving house and job, so I don’t expect a reply for some time.

Thanks
Ed

ebyard wrote:

Nate

Yeah that occurred to me also - definately cheaper and probably better in some ways, but if I can do it in software then all the better.

If you can link to SDL_gfx on the target system without violating the LGPL, then do it when loading the graphics.

Thanks for your efforts looking at this, I actually emailed Sam about me funding the implementation of this, for eventual release to the community, though of course he’s
busy moving house and job, so I don’t expect a reply for some time.

I had only looked into D3D before seeing it would be a massive task that I simply don’t have time for now. I’m unsure about the GDI or X11 rendering backends.------------------------
EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/

That should be easy, seeing as how it’s no longer under the LGPL.________________________________
From: nfries88@yahoo.com (Nathaniel J Fries)
Subject: Re: [SDL] SDL 1.3 scaling

ebyard wrote:
Nate

Yeah that occurred to me also - definately cheaper and probably better in some
ways, but if I can do it in software then all the better.

If you can link to SDL_gfx on the target system without violating the LGPL, then
do it when loading the graphics.

Blitting to an intermediate texture in SDL 1.3 requires the use of render
targets. I submitted a patch to enable render targets in OpenGL a long time
ago, but no one’s ever gotten around to merging it into the codebase. :frowning:

+1 for render targets. Very useful feature.On Sun, May 1, 2011 at 6:33 PM, Mason Wheeler wrote:

Yep, I just asked Mason to rework his OpenGL patch for inclusion. Once he
does, is anybody interested in tackling the D3D implementation?On Tue, May 3, 2011 at 2:52 AM, Ren? Dudfield wrote:

On Sun, May 1, 2011 at 6:33 PM, Mason Wheeler wrote:

Blitting to an intermediate texture in SDL 1.3 requires the use of render
targets. I submitted a patch to enable render targets in OpenGL a long time
ago, but no one’s ever gotten around to merging it into the codebase. :frowning:

+1 for render targets. Very useful feature.


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

As author of SDL_gfx, I can update/modify the license of that library to
be in sync with SDLs. Any feedback or suggestions?On 5/2/11 1:43 PM, Mason Wheeler wrote:

That should be easy, seeing as how it’s no longer under the LGPL.


From: Nathaniel J Fries
**Subject: Re: [SDL] SDL 1.3 scaling

ebyard wrote:
Nate

Yeah that occurred to me also - definately cheaper and probably better
in some ways, but if I can do it in software then all the better.

If you can link to SDL_gfx on the target system without violating the
LGPL, then do it when loading the graphics.


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

Andreas Schiffler wrote:

As author of SDL_gfx, I can update/modify the license of that library to be in sync with SDLs. Any feedback or suggestions?

It would be much appreciated, for sure! (Even better would be if you could patch against SDL 1.3 to add rotation directly to the software framebuffer, but… :P)

@Sam: I’m interested in tackling it, but I just haven’t got the time or right now (and the lack of experience with D3D is also a big setback here…).
However, I can tell you what modifications I’d recommend from the code samples I’ve gone through of render targets in D3D:

  1. Add an IDirect3DSurface9 pointer to the internal texture data structure for D3D textures (for using the texture as a target), and also one in the D3D renderer internal structure (for holding the backbuffer temporarily).
  2. When creating a texture, if the SDL_TEXTUREACCESS_TARGET value is used, call GetSurfaceLevel(0, &pointer_to_surface) on the IDirect3DTexture9 member of the struct, to get the surface member of the struct in &pointer_to_surface. Otherwise, the pointer should be NULL. I’m not sure whether or not updates to the texture would require re-doing this.
  3. Modify SDL_RenderClear to work with a render target.
  4. Store the backbuffer (IDirect3DDevice9::GetRenderTarget) before setting the render target (IDirect3DDevice9::SetRenderTarget)

Well, that should be it, but then again I know nothing but the sample code I’ve seen.

For GDI, it appears that the only way to implement render targets would be through a software rendering method. Nothing came up with a google search, and the only thing I found on an MSDN search requires interfacing with Direct2D (only available in Windows 7) or use of GDI+ (only available since Windows 2000).------------------------
EM3 Nathaniel Fries, U.S. Navy

http://natefries.net/

As author of SDL_gfx, I can update/modify the license of that library to
be in sync with SDLs. Any feedback or suggestions?

Hello,

Matching SDL would be cool.On Tue, May 3, 2011 at 3:08 PM, Andreas Schiffler wrote: