Prechádzať zdrojové kódy

examples/renderer/19-affine-textures: add metadata for examples.libsdl.org.

Ryan C. Gordon 3 týždňov pred
rodič
commit
567dfd2ebc

+ 3 - 0
examples/renderer/19-affine-textures/README.txt

@@ -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.
+

+ 1 - 1
examples/renderer/19-affine-textures/affine-textures.c

@@ -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


BIN
examples/renderer/19-affine-textures/thumbnail.png