mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Fix running on Linux / Intel Mesa drivers
* Explicitly request a GL 3.2 context * Enable 'experimental' extensions on glew (This appears necessary to get glew to work with explictly set GL versions)
This commit is contained in:
parent
63ae781d24
commit
5d91cf90b3
3 changed files with 6 additions and 3 deletions
|
|
@ -13,18 +13,16 @@ namespace PlatformGL
|
|||
return;
|
||||
|
||||
inited = true;
|
||||
const U32 majorOGL = 4;
|
||||
const U32 majorOGL = 3;
|
||||
const U32 minorOGL = 2;
|
||||
U32 debugFlag = 0;
|
||||
#ifdef TORQUE_DEBUG
|
||||
debugFlag |= SDL_GL_CONTEXT_DEBUG_FLAG;
|
||||
#endif
|
||||
|
||||
#if 0 // cause problem with glew, no extension load
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, majorOGL);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, minorOGL);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
||||
#endif
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, debugFlag);
|
||||
|
||||
SDL_ClearError();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue