The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL_RenderCopyEx with software renderer
Martin Gerhardy
Guest

Hi,

can anyone confirm, that SDL_RenderCopyEx is working with the software
renderer? Whenever I replace

SDL_RenderCopyEx(_renderer, t, &srcRect, &destRect,
static_cast<double>(angle), nullptr, SDL_FLIP_NONE)

with

SDL_RenderCopy(_renderer, t, &srcRect, &destRect)

it works, but SDL_RenderCopyEx only results in a black screen.

angle is 0 btw.

oh.. and it works with openglXX renderers, only software is broken. I
just don't see why.

Greetings
Martin
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Nathaniel J Fries


Joined: 30 Mar 2010
Posts: 444
It has code that looks like it should work. But I've never used it, so I don't know for sure.
I know that for awhile, it was disabled because of the sheer cost of performing the rendering. It really shouldn't be used for applications that need real-time display.
SDL_RenderCopyEx with software renderer
gabomdq


Joined: 28 Jul 2011
Posts: 495
Location: Argentina
2013/5/10 Martin Gerhardy
Quote:
Hi,

can anyone confirm, that SDL_RenderCopyEx is working with the software renderer? Whenever I replace

SDL_RenderCopyEx(_renderer, t, &srcRect, &destRect, static_cast<double>(angle), nullptr, SDL_FLIP_NONE)

with

SDL_RenderCopy(_renderer, t, &srcRect, &destRect)

it works, but SDL_RenderCopyEx only results in a black screen.

angle is 0 btw.

oh.. and it works with openglXX renderers, only software is broken. I just don't see why.

Greetings
Martin
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



Last time I checked (which is actually when the SDL_RenderCopyEx function was accepted into SDL), it was working (using testsprite2). From the top of my head, I think you could try a different pixel format, perhaps some formats are broken and we just haven't noticed it.

--
Gabriel.
SDL_RenderCopyEx with software renderer
Sik


Joined: 26 Nov 2011
Posts: 905
2013/5/10, Nathaniel J Fries:
Quote:
I know that for awhile, it was disabled because of the sheer cost of
performing the rendering. It really shouldn't be used for applications that
need real-time display.

I don't think that's a good enough excuse to leave it broken though...
(also I thought the point of the software renderer was to be a
fallback in case everything else failed)

I only have used SDL_RenderCopy so I can't confirm if SDL_RenderCopyEx
is broken though. I guess I could do a quick test to check (as my game
has a switch to toggle to the software renderer).
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL_RenderCopyEx with software renderer
Sik


Joined: 26 Nov 2011
Posts: 905
OK, I just tried, and it does work... but *always* uses alpha
blending. In my case I have alpha blending disabled (using RGBA8 only
for optimization purposes since 1 pixel = 1 uint32_t), and some
rendering functions will set the alpha to 0x00 or 0xFF arbitrarily.
With alpha blending disabled this usually isn't an issue, but
SDL_RenderCopyEx seems to ignore that.

Is it possible it's the same issue here?
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL_RenderCopyEx with software renderer
Sik


Joined: 26 Nov 2011
Posts: 905
Attached screenshot of what happens.

Should this go as a bug report, I guess?

2013/5/10, Sik the hedgehog:
Quote:
OK, I just tried, and it does work... but *always* uses alpha
blending. In my case I have alpha blending disabled (using RGBA8 only
for optimization purposes since 1 pixel = 1 uint32_t), and some
rendering functions will set the alpha to 0x00 or 0xFF arbitrarily.
With alpha blending disabled this usually isn't an issue, but
SDL_RenderCopyEx seems to ignore that.

Is it possible it's the same issue here?


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL_RenderCopyEx with software renderer
Sam Lantinga


Joined: 10 Sep 2009
Posts: 1765
Yes, please report this as a bug, ideally with a patch to fix it. Winkhttp://bugzilla.libsdl.org/



On Fri, May 10, 2013 at 4:13 PM, Sik the hedgehog wrote:
Quote:
Attached screenshot of what happens.

Should this go as a bug report, I guess?

2013/5/10, Sik the hedgehog:
Quote:
OK, I just tried, and it does work... but *always* uses alpha
blending. In my case I have alpha blending disabled (using RGBA8 only
for optimization purposes since 1 pixel = 1 uint32_t), and some
rendering functions will set the alpha to 0x00 or 0xFF arbitrarily.
With alpha blending disabled this usually isn't an issue, but
SDL_RenderCopyEx seems to ignore that.

Is it possible it's the same issue here?




_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

SDL_RenderCopyEx with software renderer
Sam Lantinga


Joined: 10 Sep 2009
Posts: 1765
Yes, please report this as a bug, ideally with a patch to fix it. Winkhttp://bugzilla.libsdl.org/



On Fri, May 10, 2013 at 4:13 PM, Sik the hedgehog wrote:
Quote:
Attached screenshot of what happens.

Should this go as a bug report, I guess?

2013/5/10, Sik the hedgehog:
Quote:
OK, I just tried, and it does work... but *always* uses alpha
blending. In my case I have alpha blending disabled (using RGBA8 only
for optimization purposes since 1 pixel = 1 uint32_t), and some
rendering functions will set the alpha to 0x00 or 0xFF arbitrarily.
With alpha blending disabled this usually isn't an issue, but
SDL_RenderCopyEx seems to ignore that.

Is it possible it's the same issue here?




_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org