Query the maximum texture size for the D3D renderer.
authorSam Lantinga <slouken@libsdl.org>
Sat, 22 Jul 2006 21:17:37 +0000
changeset 1925411bfb37082b
parent 1924 69217fdd2c0a
child 1926 307355678142
Query the maximum texture size for the D3D renderer.
src/video/win32/SDL_d3drender.c
     1.1 --- a/src/video/win32/SDL_d3drender.c	Sat Jul 22 21:02:57 2006 +0000
     1.2 +++ b/src/video/win32/SDL_d3drender.c	Sat Jul 22 21:17:37 2006 +0000
     1.3 @@ -238,6 +238,7 @@
     1.4      HRESULT result;
     1.5      D3DPRESENT_PARAMETERS pparams;
     1.6      IDirect3DSwapChain9 *chain;
     1.7 +    D3DCAPS9 caps;
     1.8  
     1.9      renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
    1.10      if (!renderer) {
    1.11 @@ -355,7 +356,9 @@
    1.12          renderer->info.flags |= SDL_Renderer_PresentVSync;
    1.13      }
    1.14  
    1.15 -    /* FIXME: Query maximum texture size */
    1.16 +    IDirect3DDevice9_GetDeviceCaps(data->device, &caps);
    1.17 +    renderer->info.max_texture_width = caps.MaxTextureWidth;
    1.18 +    renderer->info.max_texture_height = caps.MaxTextureHeight;
    1.19  
    1.20      /* Set up parameters for rendering */
    1.21      IDirect3DDevice9_SetVertexShader(data->device, NULL);