changeset 1925:411bfb37082b

Query the maximum texture size for the D3D renderer.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 22 Jul 2006 21:17:37 +0000
parents 69217fdd2c0a
children 307355678142
files src/video/win32/SDL_d3drender.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/win32/SDL_d3drender.c	Sat Jul 22 21:02:57 2006 +0000
+++ b/src/video/win32/SDL_d3drender.c	Sat Jul 22 21:17:37 2006 +0000
@@ -238,6 +238,7 @@
     HRESULT result;
     D3DPRESENT_PARAMETERS pparams;
     IDirect3DSwapChain9 *chain;
+    D3DCAPS9 caps;
 
     renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
     if (!renderer) {
@@ -355,7 +356,9 @@
         renderer->info.flags |= SDL_Renderer_PresentVSync;
     }
 
-    /* FIXME: Query maximum texture size */
+    IDirect3DDevice9_GetDeviceCaps(data->device, &caps);
+    renderer->info.max_texture_width = caps.MaxTextureWidth;
+    renderer->info.max_texture_height = caps.MaxTextureHeight;
 
     /* Set up parameters for rendering */
     IDirect3DDevice9_SetVertexShader(data->device, NULL);