Преглед на файлове

Sync SDL3 wiki -> header

[ci skip]
SDL Wiki Bot преди 1 ден
родител
ревизия
8e0b39f465
променени са 1 файла, в които са добавени 17 реда и са изтрити 0 реда
  1. 17 0
      include/SDL3/SDL_gpu.h

+ 17 - 0
include/SDL3/SDL_gpu.h

@@ -237,6 +237,23 @@
  * - iOS/tvOS requires an A9 GPU or newer
  * - iOS/tvOS requires an A9 GPU or newer
  * - iOS Simulator and tvOS Simulator are unsupported
  * - iOS Simulator and tvOS Simulator are unsupported
  *
  *
+ * ## Coordinate System
+ *
+ * The GPU API uses a left-handed coordinate system, following the convention
+ * of D3D12 and Metal. Specifically: - **Normalized Device Coordinates:** The
+ * lower-left corner has an x,y coordinate of `(-1.0, -1.0)`. The upper-right
+ * corner is `(1.0, 1.0)`. Z values range from `[0.0, 1.0]` where 0 is the
+ * near plane. - **Viewport Coordinates:** The top-left corner has an x,y
+ * coordinate of `(0, 0)` and extends to the bottom-right corner at
+ * `(viewportWidth, viewportHeight)`. +Y is down. - **Texture Coordinates:**
+ * The top-left corner has an x,y coordinate of `(0, 0)` and extends to the
+ * bottom-right corner at `(1.0, 1.0)`. +Y is down.
+ *
+ * If the backend driver differs from this convention (e.g. Vulkan, which has
+ * an NDC that assumes +Y is down), SDL will automatically convert the
+ * coordinate system behind the scenes, so you don't need to perform any
+ * coordinate flipping logic in your shaders.
+ *
  * ## Uniform Data
  * ## Uniform Data
  *
  *
  * Uniforms are for passing data to shaders. The uniform data will be constant
  * Uniforms are for passing data to shaders. The uniform data will be constant