Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Query the maximum texture size for the D3D renderer.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jul 22, 2006
1 parent cc953cc commit 933af03
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/video/win32/SDL_d3drender.c
Expand Up @@ -238,6 +238,7 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
HRESULT result;
D3DPRESENT_PARAMETERS pparams;
IDirect3DSwapChain9 *chain;
D3DCAPS9 caps;

renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
if (!renderer) {
Expand Down Expand Up @@ -355,7 +356,9 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
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);
Expand Down

0 comments on commit 933af03

Please sign in to comment.