@@ -85,6 +85,14 @@ struct RenderDevice {
8585 */
8686 SDL_GPUShaderFormat shaderFormats ;
8787
88+ /**
89+ * @brief The anisotropic filtering level applied by `createSamplerLinearRepeat`
90+ * and `createSamplerLinearClamp`. Defaults to `0` (anisotropic filtering
91+ * disabled). Assign directly; only affects Samplers created afterward, since
92+ * SDL_gpu Samplers are immutable once created.
93+ */
94+ float maxAnisotropy ;
95+
8896 /**
8997 * @brief The present-target Framebuffer driven by `beginFrame`/`endFrame`, or `NULL`.
9098 * @details Set via `setFramebuffer` (retained). `beginFrame` resizes it to the
@@ -241,25 +249,25 @@ struct RenderDeviceInterface {
241249 Sampler * (* createSampler )(RenderDevice * self , const SDL_GPUSamplerCreateInfo * info );
242250
243251 /**
244- * @fn Sampler *RenderDevice::createSamplerLinearRepeat(RenderDevice *self, float maxAnisotropy )
252+ * @fn Sampler *RenderDevice::createSamplerLinearRepeat(RenderDevice *self)
245253 * @brief Creates a trilinear, wrapping Sampler -- the common preset for tiled surface textures.
246254 * @details Linear min/mag filter, linear mipmap mode, `REPEAT` addressing on all
247- * three axes. Anisotropic filtering is enabled when @p maxAnisotropy is greater
248- * than zero .
255+ * three axes. Anisotropic filtering is enabled when `self-> maxAnisotropy` is
256+ * greater than `0` .
249257 * @param self The RenderDevice.
250- * @param maxAnisotropy The maximum anisotropy level, or `0` to disable anisotropic filtering.
251258 * @return A new, retained Sampler. GPU_Asserts on failure. Free with `release`.
252259 * @memberof RenderDevice
253260 */
254- Sampler * (* createSamplerLinearRepeat )(RenderDevice * self , float maxAnisotropy );
261+ Sampler * (* createSamplerLinearRepeat )(RenderDevice * self );
255262
256263 /**
257264 * @fn Sampler *RenderDevice::createSamplerLinearClamp(RenderDevice *self)
258265 * @brief Creates a trilinear, edge-clamped Sampler -- the common preset for
259266 * continuously-sampled volumes and non-tiling images (ambient/voxel volumes,
260267 * cubemaps, post-process targets, UI images).
261268 * @details Linear min/mag filter, linear mipmap mode, `CLAMP_TO_EDGE` addressing
262- * on all three axes, no anisotropic filtering.
269+ * on all three axes. Anisotropic filtering is enabled when `self->maxAnisotropy`
270+ * is greater than `0`.
263271 * @param self The RenderDevice.
264272 * @return A new, retained Sampler. GPU_Asserts on failure. Free with `release`.
265273 * @memberof RenderDevice
0 commit comments