MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / CreateContextGL

Function CreateContextGL

Engine/source/platformSDL/sdlPlatformGL.cpp:35–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

initMethod · 0.85

Calls 6

SDL_ClearErrorFunction · 0.85
SDL_GL_CreateContextFunction · 0.85
SDL_GetErrorFunction · 0.85
printfFunction · 0.85
getSDLWindowMethod · 0.80
initFunction · 0.70

Tested by

no test coverage detected