mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-04 21:10:32 +00:00
cache OpenGL extensions that are not part of the 3.3 core profile, and that run more than initialization setup.
This commit is contained in:
parent
a216b4515b
commit
f9b2aa397f
12 changed files with 58 additions and 20 deletions
|
|
@ -140,10 +140,18 @@ void GFXGLDevice::initGLState()
|
|||
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
// [JTH 5/6/2016] GLSL 1.50 is really SM 4.0
|
||||
// Setting mPixelShaderVersion to 3.0 will allow Advanced Lighting to run.
|
||||
mPixelShaderVersion = 3.0;
|
||||
|
||||
mSupportsAnisotropic = mCardProfiler->queryProfile( "GL_EXT_TEXTURE_FILTER_ANISOTROPIC" );
|
||||
// Set capability extensions.
|
||||
mCapabilities.anisotropicFiltering = mCardProfiler->queryProfile("GL_EXT_texture_filter_anisotropic");
|
||||
mCapabilities.bufferStorage = mCardProfiler->queryProfile("GL_ARB_buffer_storage");
|
||||
mCapabilities.shaderModel5 = mCardProfiler->queryProfile("GL_ARB_gpu_shader5");
|
||||
mCapabilities.textureStorage = mCardProfiler->queryProfile("GL_ARB_texture_storage");
|
||||
mCapabilities.samplerObjects = mCardProfiler->queryProfile("GL_ARB_sampler_objects");
|
||||
mCapabilities.copyImage = mCardProfiler->queryProfile("GL_ARB_copy_image");
|
||||
mCapabilities.vertexAttributeBinding = mCardProfiler->queryProfile("GL_ARB_vertex_attrib_binding");
|
||||
|
||||
String vendorStr = (const char*)glGetString( GL_VENDOR );
|
||||
if( vendorStr.find("NVIDIA", 0, String::NoCase | String::Left) != String::NPos)
|
||||
|
|
@ -216,6 +224,9 @@ GFXGLDevice::GFXGLDevice(U32 adapterIndex) :
|
|||
mCurrentVB_Divisor[i] = 0;
|
||||
}
|
||||
|
||||
// Initiailize capabilities to false.
|
||||
memset(&mCapabilities, 0, sizeof(GLCapabilities));
|
||||
|
||||
loadGLCore();
|
||||
|
||||
GFXGLEnumTranslate::init();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue