Mercurial > sdl-ios-xcode
comparison src/video/win32/SDL_win32window.c @ 1952:420716272158
Implemented X11 OpenGL support.
Added support for the SDL_VIDEO_OPENGL environment variable.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 28 Jul 2006 08:43:17 +0000 |
parents | 7177581dc9fa |
children | ba0d62354872 |
comparison
equal
deleted
inserted
replaced
1951:7177581dc9fa | 1952:420716272158 |
---|---|
211 | 211 |
212 if (SetupWindowData(_this, window, hwnd, SDL_TRUE) < 0) { | 212 if (SetupWindowData(_this, window, hwnd, SDL_TRUE) < 0) { |
213 DestroyWindow(hwnd); | 213 DestroyWindow(hwnd); |
214 return -1; | 214 return -1; |
215 } | 215 } |
216 #ifdef SDL_VIDEO_OPENGL | 216 #ifdef SDL_VIDEO_OPENGL_WGL |
217 if (window->flags & SDL_WINDOW_OPENGL) { | 217 if (window->flags & SDL_WINDOW_OPENGL) { |
218 if (WIN_GL_SetupWindow(_this, window) < 0) { | 218 if (WIN_GL_SetupWindow(_this, window) < 0) { |
219 WIN_DestroyWindow(_this, window); | 219 WIN_DestroyWindow(_this, window); |
220 return -1; | 220 return -1; |
221 } | 221 } |
417 WIN_DestroyWindow(_THIS, SDL_Window * window) | 417 WIN_DestroyWindow(_THIS, SDL_Window * window) |
418 { | 418 { |
419 SDL_WindowData *data = (SDL_WindowData *) window->driverdata; | 419 SDL_WindowData *data = (SDL_WindowData *) window->driverdata; |
420 | 420 |
421 if (data) { | 421 if (data) { |
422 #ifdef SDL_VIDEO_OPENGL | 422 #ifdef SDL_VIDEO_OPENGL_WGL |
423 if (window->flags & SDL_WINDOW_OPENGL) { | 423 if (window->flags & SDL_WINDOW_OPENGL) { |
424 WIN_GL_CleanupWindow(_this, window); | 424 WIN_GL_CleanupWindow(_this, window); |
425 } | 425 } |
426 #endif | 426 #endif |
427 ReleaseDC(data->hwnd, data->hdc); | 427 ReleaseDC(data->hwnd, data->hdc); |