| 33 | } |
| 34 | |
| 35 | void* CreateContextGL( PlatformWindow *window ) |
| 36 | { |
| 37 | init(); |
| 38 | |
| 39 | PlatformWindowSDL* windowSdl = dynamic_cast<PlatformWindowSDL*>(window); |
| 40 | AssertFatal(windowSdl, ""); |
| 41 | |
| 42 | if( !windowSdl ) |
| 43 | return NULL; |
| 44 | |
| 45 | SDL_ClearError(); |
| 46 | SDL_GLContext ctx = SDL_GL_CreateContext( windowSdl->getSDLWindow() ); |
| 47 | if( !ctx ) |
| 48 | { |
| 49 | const char *err = SDL_GetError(); |
| 50 | Con::printf( err ); |
| 51 | AssertFatal(0, err ); |
| 52 | } |
| 53 | |
| 54 | return ctx; |
| 55 | } |
| 56 | |
| 57 | void MakeCurrentGL( PlatformWindow *window, void *glContext ) |
| 58 | { |
no test coverage detected