mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-25 15:48:58 +00:00
examples/renderer/19-affine-textures: add metadata for examples.libsdl.org.
This commit is contained in:
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 |
Reference in New Issue
Block a user