comparison src/video/win32/SDL_d3drender.c @ 1924:69217fdd2c0a

If the OpenGL renderer is selected for a non-OpenGL window, recreate the window with OpenGL enabled. Added OpenGL renderer error checking. Use fast-path texture formats in the OpenGL renderer.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 22 Jul 2006 21:02:57 +0000
parents f3399f779a1d
children 411bfb37082b
comparison
equal deleted inserted replaced
1923:d4572b97b08f 1924:69217fdd2c0a
394 IDirect3DDevice9_CreateTexture(renderdata->device, texture->w, 394 IDirect3DDevice9_CreateTexture(renderdata->device, texture->w,
395 texture->h, 1, 0, 395 texture->h, 1, 0,
396 PixelFormatToD3DFMT(texture->format), 396 PixelFormatToD3DFMT(texture->format),
397 pool, &data->texture, NULL); 397 pool, &data->texture, NULL);
398 if (FAILED(result)) { 398 if (FAILED(result)) {
399 SDL_free(data);
400 D3D_SetError("CreateTexture()", result); 399 D3D_SetError("CreateTexture()", result);
401 return -1; 400 return -1;
402 } 401 }
403 402
404 return 0; 403 return 0;