Skewed projetions

Hello,

Is there a way to plot a surface/texture on anything OTHER than a rectangle?

This would require a function accepting (all) vertex positions… to produce such an arbitrary Quad.

I’d assume openGL would have such projection functions but then again the promise stated on this talk [1] about having something like a “Duke Nukem 3D” on SDL alone or, at least having the top edge smaller for much simpler stuff like [2], would then be much easier to do. : )

thanks.

[1] https://www.youtube.com/watch?v=Sd8ie5R4CVE
[2] Lou’s pseudo 3d: http://www.extentofthejam.com/pseudo/

EDIT: I’d probably shouldn’t say “projection”, it really only needs to deform the image ‘linearly’ / no perspective.

1 Like

Did someone ever figured this or some sort of affine transform or similar in SDL2 renderer?

Did someone ever figured this or some sort of affine transform or similar in SDL2 renderer?

SDL_RenderGeometry()/SDL_RenderGeometryRaw() not working for some reason?

Ah yes, a header with zero examples thanks

Wiki has an example for the basic function. The raw function does the same, but without the handy SDL_Vertex struct.

try this approach Am I using SDL_RenderGeometry correctly?