SDL 2.0.1 + opengl render driver + SDL2_gfx = slow

Jonny D wrote:

SDL_gpu is good if you can (or want to) assume decent GPU support. ?I authored the project for a few reasons:
A consistent API for 2D effects that SDL_Renderer wouldn’t support.

Hello, I am currently playing with this great library. But there is a problem with creating images from surfaces (GPU_CopyImageFromSurface, GPU_LoadImage): the image is created correctly only when surface.w==surface.pitch, otherwise the final image is distorted. Is it a known issue? Is there any workaround for this?

Anather small issue is with drawing shapes with thickness greater than 1, for example a rectangle with thickness of 10 does not really look like a rectangle (the lines are not connected in the right way).

Otherwise, useful library. Thanks.

Hey Miko,

I’ve been working on an unrelated project for a while, so SDL_gpu hasn’t
seen my attention lately.

Anyhow, I pushed an update for the rectangle rendering. The previous
implementation simply used OpenGL’s line drawing and thickness controls,
which are not very good to begin with. I’ll have to replace many of the
other primitives like that too.

Can you send me an image that exhibits that distortion issue? That would
make it easier for me to work out a fix.

If you run into any other problems, just open a new issue on the SDL_gpu
Google Code page.

Thanks!
Jonny DOn Fri, Nov 22, 2013 at 5:44 PM, miko wrote:

Jonny D wrote:

SDL_gpu is good if you can (or want to) assume decent GPU support. I
authored the project for a few reasons:
A consistent API for 2D effects that SDL_Renderer wouldn’t support.

Hello, I am currently playing with this great library. But there is a
problem with creating images from surfaces (GPU_CopyImageFromSurface,
GPU_LoadImage): the image is created correctly only when
surface.w==surface.pitch, otherwise the final image is distorted. Is it a
known issue? Is there any workaround for this?

Anather small issue is with drawing shapes with thickness greater than 1,
for example a rectangle with thickness of 10 does not really look like a
rectangle (the lines are not connected in the right way).

Otherwise, useful library. Thanks.


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

Jonny D wrote:

Anyhow, I pushed an update for the rectangle rendering. ?The previous implementation simply used OpenGL’s line drawing and thickness controls, which are not very good to begin with. ?I’ll have to replace many of the other primitives like that too.

I opened the issue on Google Code and attached the program/screenshot, but that was for revision 174. After updating the sources to r175 the rectangle looks good, so the issue can ble closed now.
Thank you,
miko