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 1633 - Implement polygon rendering
Summary: Implement polygon rendering
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.0
Hardware: All All
: P2 enhancement
Assignee: Gabriel Jacobo
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-01 04:10 UTC by Martin Gerhardy
Modified: 2019-06-04 13:30 UTC (History)
2 users (show)

See Also:


Attachments
Proposed patch (21.53 KB, patch)
2012-11-08 05:21 UTC, Martin Gerhardy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Gerhardy 2012-11-01 04:10:40 UTC
Having the ability to render polygons in the SDL render interface would be really nice. Something like:

  int SDL_RenderDrawPolygons(SDL_Renderer * renderer, const float* vertices, const int count);
Comment 1 Martin Gerhardy 2012-11-08 05:21:44 UTC
Created attachment 985 [details]
Proposed patch
Comment 2 Martin Gerhardy 2012-11-08 05:22:30 UTC
would something like that be acceptable?
Comment 3 Sam Lantinga 2012-11-08 07:46:34 UTC
That seems pretty good.

Have you thought about what would be required for the software implementation?
Comment 4 Martin Gerhardy 2012-11-08 07:48:02 UTC
hehe - not yet ;) i will do some research. just wanted to ensure that any work on this side isn't for the trash because it won't get accepted upstream.
Comment 5 Adam M. 2014-05-10 03:14:41 UTC
Shouldn't you be passing an array of points or something, rather than an array of floats? And why floats when other renderer functions use ints? There should be consistency here.
Comment 6 Sam Lantinga 2014-06-22 17:19:38 UTC
Assigning to Gabriel, since it overlaps work that he's doing.
Comment 7 Ellie 2019-06-04 13:30:28 UTC
This looks really nice, and it could be an absolute game changer for TEXTURED polygons.

Imagine something like Diablo 2's fake 3d mode, or simple oldschool-style games that don't need shaders! Currently this can only be done using OpenGL, and of course using that would be faster too with VBO and other functionality being available, but it would be so cool if for really basic but universal 3d effects one could also use SDL2 for simplicity. It's just such an easier way to get started!

I just wanted to say that if this ever gets picked up and if textured triangles were to be added that support SDL2's texture color mod when rendering, I'd definitely be using it