[ANNC] SDL_gpu 0.8.0 release

Hey everyone,

I want to announce that after much development, SDL_gpu has its first
binary release! I’d appreciate it if you’d check it out and tell me what
you think. There’s only a mingw32 binary so far, but with your help I can
add more.

In case you aren’t familiar with it yet, SDL_gpu is an alternative
rendering system for SDL 1.2 and SDL 2.0. It includes everything you need
to make amazing, high-performance 2D graphics:

  • Fast buffered blits
  • Shader support
  • Sprite rotation and scaling
  • Plenty of 2D primitives (e.g. lines, arcs, circles, rounded rectangles,
    annulus sectors)
  • Render-to-Texture
  • An enjoyable basic abstraction (targets and images)
  • Virtual resolution and viewports
  • 2D camera control
  • Built-in support for some popular image formats
  • Blend, filter, and wrap modes
  • Arbitrary 2D geometry (batched textured triangles)
  • Can be used with native OpenGL calls

You can get started at the Google Code page. There’s some introductory
info, documentation, and downloads there:
https://code.google.com/p/sdl-gpu/

If you see anything missing that you think would make SDL_gpu better or if
you notice any bugs, please let me know! I hope you like it and get much
use out of it!

Jonny D

this looks very promising. gonna check it out asap.

2014-03-06 15:36 GMT-07:00 Jonathan Dearborn :> Hey everyone,

I want to announce that after much development, SDL_gpu has its first
binary release! I’d appreciate it if you’d check it out and tell me what
you think. There’s only a mingw32 binary so far, but with your help I can
add more.

In case you aren’t familiar with it yet, SDL_gpu is an alternative
rendering system for SDL 1.2 and SDL 2.0. It includes everything you need
to make amazing, high-performance 2D graphics:

  • Fast buffered blits
  • Shader support
  • Sprite rotation and scaling
  • Plenty of 2D primitives (e.g. lines, arcs, circles, rounded rectangles,
    annulus sectors)
  • Render-to-Texture
  • An enjoyable basic abstraction (targets and images)
  • Virtual resolution and viewports
  • 2D camera control
  • Built-in support for some popular image formats
  • Blend, filter, and wrap modes
  • Arbitrary 2D geometry (batched textured triangles)
  • Can be used with native OpenGL calls

You can get started at the Google Code page. There’s some introductory
info, documentation, and downloads there:
https://code.google.com/p/sdl-gpu/

If you see anything missing that you think would make SDL_gpu better or if
you notice any bugs, please let me know! I hope you like it and get much
use out of it!

Jonny D


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


Javier Flores

The only thing I want that’s not listed I think, is to be able to use
lighting effects on my to the surface. Its more useful than it sounds. I
could use it for lighting in a dungeon instead of trying to figure out how
to brighten up those pixels myself :slight_smile:

when you rotate an gpu_image through blittransform or blitrotate, what is
the pivot point that the image rotates around? the center? topleft?

2014-03-06 16:09 GMT-07:00 R Manard :> The only thing I want that’s not listed I think, is to be able to use

lighting effects on my to the surface. Its more useful than it sounds. I
could use it for lighting in a dungeon instead of trying to figure out how
to brighten up those pixels myself :slight_smile:


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


Javier Flores

For those functions, the pivot point is the center. If you need to specify
the pivot point (in image coords), use GPU_BlitTransformX():
http://bit.ly/1erPnL7

One note for BlitTransformX is that the image will be drawn with the pivot
point aligned with the destination coords (x,y).

Jonny D

oh, thanks, btw: is there any way to do a tiled image with sdl_gpu?.

btw2: looking forward for the tutorial. great library.

2014-03-12 7:20 GMT-07:00 Jonathan Dearborn :> For those functions, the pivot point is the center. If you need to

specify the pivot point (in image coords), use GPU_BlitTransformX():
http://bit.ly/1erPnL7

One note for BlitTransformX is that the image will be drawn with the pivot
point aligned with the destination coords (x,y).

Jonny D


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


Javier Flores

Thanks. :slight_smile:

Yeah, you can set image wrap modes like this:
GPU_SetWrapMode(image, GPU_WRAP_REPEAT, GPU_WRAP_REPEAT);

Then blit the image with a source rect that goes beyond the image bounds,
e.g.:
GPU_Rect r = {0, 0, image->w4, image->h4};
GPU_Blit(image, &r, screen, r.w/2, r.h/2);

Jonny D

awesome!, so useful, i wish something like this would be in sdl textures by
default.

2014-03-12 19:31 GMT-07:00 Jonathan Dearborn :> Thanks. :slight_smile:

Yeah, you can set image wrap modes like this:
GPU_SetWrapMode(image, GPU_WRAP_REPEAT, GPU_WRAP_REPEAT);

Then blit the image with a source rect that goes beyond the image bounds,
e.g.:
GPU_Rect r = {0, 0, image->w4, image->h4};
GPU_Blit(image, &r, screen, r.w/2, r.h/2);

Jonny D


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


Javier Flores