mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
linux followup work by tim
This commit is contained in:
parent
669e811cbb
commit
059d531b62
26 changed files with 6646 additions and 5681 deletions
|
|
@ -84,7 +84,7 @@ void GFXGLDevice::enumerateAdapters( Vector<GFXAdapter*> &adapterList )
|
|||
|
||||
SDL_ClearError();
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
||||
SDL_GL_SetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 1);
|
||||
|
||||
|
|
@ -111,14 +111,27 @@ void GFXGLDevice::enumerateAdapters( Vector<GFXAdapter*> &adapterList )
|
|||
loadGLCore();
|
||||
loadGLExtensions(tempContext);
|
||||
|
||||
//check minimun Opengl 3.2
|
||||
//check minimun Opengl 3.3
|
||||
int major, minor;
|
||||
glGetIntegerv(GL_MAJOR_VERSION, &major);
|
||||
glGetIntegerv(GL_MINOR_VERSION, &minor);
|
||||
if( major < 3 || ( major == 3 && minor < 2 ) )
|
||||
if( major < 3 || ( major == 3 && minor < 3 ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//check for required extensions
|
||||
if (!gglHasExtension(ARB_texture_cube_map_array))
|
||||
{
|
||||
Con::warnf("Adapater supports OpenGL 3.3 but doesnt support GL_ARB_texture_cube_map_array");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!gglHasExtension(ARB_gpu_shader5))
|
||||
{
|
||||
Con::warnf("Adapater supports OpenGL 3.3 but doesnt support GL_ARB_gpu_shader5");
|
||||
return;
|
||||
}
|
||||
|
||||
GFXAdapter *toAdd = new GFXAdapter;
|
||||
toAdd->mIndex = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue