We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2253 - extend 2D render api with transform stack
Summary: extend 2D render api with transform stack
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: HG 2.1
Hardware: x86_64 Windows 7
: P2 enhancement
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-19 22:13 UTC by Guillaume Laforie
Modified: 2013-11-24 20:16 UTC (History)
1 user (show)

See Also:


Attachments
add transform stack to the renderer api v1 (18.09 KB, patch)
2013-11-19 22:13 UTC, Guillaume Laforie
Details | Diff
add transform stack to the renderer api v2 (20.62 KB, patch)
2013-11-24 20:16 UTC, Guillaume Laforie
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Laforie 2013-11-19 22:13:51 UTC
Created attachment 1461 [details]
add transform stack to the renderer api v1

here is my patch for extend the renderer api with transform stack
current transform (scale, rotate, translate)
current renderer direct3d, opengl
Comment 1 Philipp Wiesemann 2013-11-23 11:55:25 UTC
I have not tried the patch but here some comment for possible (although minor and maybe really important) improvements:
 * SDL_render.h: There is no documentation what the four new functions actually do. I can guess it but maybe a small description and ranges for arguments would be useful for some users.
 * SDL_render.h: There is a typo at the comment for SDL_RENDERER_TRANSFORM.
 * SDL_render.c: It would be possible to use "return SDL_Error()" instead of calling SDL_Error() and then "return -1".
 * SDL_render.*: Parameter names have inconsistent case: "offsetx"/"offsetx" (lower case) and "scaleX"/"scaleY" (camelCase).
 * SDL_render_d3d.c: Two error messages tell "SetTransformp()" failed but (in the source) "SetTransform()" was called.
Comment 2 Guillaume Laforie 2013-11-24 20:16:01 UTC
Created attachment 1474 [details]
add transform stack to the renderer api v2

take account from remarks. This patch is needed to simplify a private project and i only need windows plateform, i added opengl because it's simple. I can add opengl_es in case of interrest in the fonctionnality. For software it is more difficult... i will have a look at opencv for this one...