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

Function init

Engine/source/platformSDL/sdlPlatformGL.cpp:14–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12{
13
14 void init()
15 {
16 const U32 majorOGL = 3;
17 const U32 minorOGL = 3;
18 U32 debugFlag = 0;
19#ifdef TORQUE_DEBUG
20 debugFlag |= SDL_GL_CONTEXT_DEBUG_FLAG;
21#endif
22
23 SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, majorOGL);
24 SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, minorOGL);
25 SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
26 SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, debugFlag);
27 SDL_GL_SetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 1);
28#ifdef TORQUE_GL_SOFTWARE
29 SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 0);
30#endif
31
32 SDL_ClearError();
33 }
34
35 void* CreateContextGL( PlatformWindow *window )
36 {

Callers 9

initMethod · 0.70
CreateContextGLFunction · 0.70
initMethod · 0.50
POSIXMath.cppFile · 0.50
initMethod · 0.50
enumerateDevicesMethod · 0.50
initMethod · 0.50
initMethod · 0.50
winMath.cppFile · 0.50

Calls 2

SDL_GL_SetAttributeFunction · 0.85
SDL_ClearErrorFunction · 0.85

Tested by

no test coverage detected