| Summary: | extend 2D render api with transform stack | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Guillaume Laforie <guillaume.laforie> |
| Component: | render | Assignee: | Sam Lantinga <slouken> |
| Status: | NEW --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | CC: | philipp.wiesemann |
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Windows 7 | ||
| Attachments: |
add transform stack to the renderer api v1
add transform stack to the renderer api v2 |
||
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. 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...
|
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