mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
examples/renderer/19-affine-textures: add metadata for examples.libsdl.org.
This commit is contained in:
parent
5ab1aef367
commit
567dfd2ebc
4 changed files with 4 additions and 1 deletions
3
examples/renderer/19-affine-textures/README.txt
Normal file
3
examples/renderer/19-affine-textures/README.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
This example creates an SDL window and renderer, and uses
|
||||
SDL_RenderTextureAffine to draw a 3D cube using only 2D rendering operations.
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ SDL_AppResult SDL_AppIterate(void *appstate)
|
|||
const float px = SDL_min(WINDOW_WIDTH, WINDOW_HEIGHT) / SDL_sqrtf(3.0f);
|
||||
|
||||
const Uint64 now = SDL_GetTicks();
|
||||
const float rad = (((float) ((int) (now % 4000))) / 4000.0f) * SDL_PI_F * 2;
|
||||
const float rad = (((float) ((int) (now % 2000))) / 2000.0f) * SDL_PI_F * 2;
|
||||
const float cos = SDL_cosf(rad);
|
||||
const float sin = SDL_sinf(rad);
|
||||
const float k[3] = { 3.0f / SDL_sqrtf(50.0f), 4.0f / SDL_sqrtf(50.0f), 5.0f / SDL_sqrtf(50.0f)};
|
||||
|
|
|
|||
BIN
examples/renderer/19-affine-textures/onmouseover.webp
Normal file
BIN
examples/renderer/19-affine-textures/onmouseover.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 206 KiB |
BIN
examples/renderer/19-affine-textures/thumbnail.png
Normal file
BIN
examples/renderer/19-affine-textures/thumbnail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 229 KiB |
Loading…
Add table
Add a link
Reference in a new issue