Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-09-10 15:18:19 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-10 15:19:00 +0300
commit8d59f060ca73247b2265db04655eef9db0f1c06a (patch)
treeb9dd534a3dbe7ce805fa6f0fb11b0a9301fb8fde /source/blender/gpu/opengl/gl_state.cc
parent9d5977f5e1fa2eac782278c61c3cc86685cc1b5a (diff)
GL: Wrap extension support inside GLContext
This makes it possible to disable all the extensions when forcing workarounds. Also it will allow future options to selectively disable each extension to know which one is buggy.
Diffstat (limited to 'source/blender/gpu/opengl/gl_state.cc')
-rw-r--r--source/blender/gpu/opengl/gl_state.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/gpu/opengl/gl_state.cc b/source/blender/gpu/opengl/gl_state.cc
index 970a4d45a88..03762edac93 100644
--- a/source/blender/gpu/opengl/gl_state.cc
+++ b/source/blender/gpu/opengl/gl_state.cc
@@ -56,7 +56,7 @@ GLStateManager::GLStateManager(void) : GPUStateManager()
glPrimitiveRestartIndex((GLuint)0xFFFFFFFF);
/* TODO: Should become default. But needs at least GL 4.3 */
- if (GLEW_ARB_ES3_compatibility) {
+ if (GLContext::fixed_restart_index_support) {
/* Takes precedence over #GL_PRIMITIVE_RESTART. */
glEnable(GL_PRIMITIVE_RESTART_FIXED_INDEX);
}
@@ -454,7 +454,6 @@ void GLStateManager::texture_bind(Texture *tex_, eGPUSamplerState sampler_type,
/* Bind the texture to slot 0 for editing purpose. Used by legacy pipeline. */
void GLStateManager::texture_bind_temp(GLTexture *tex)
{
- // BLI_assert(!GLEW_ARB_direct_state_access);
glActiveTexture(GL_TEXTURE0);
glBindTexture(tex->target_, tex->tex_id_);
/* Will reset the first texture that was originally bound to slot 0 back before drawing. */
@@ -506,7 +505,7 @@ void GLStateManager::texture_bind_apply(void)
int last = 64 - bitscan_reverse_uint64(dirty_bind);
int count = last - first;
- if (GLEW_ARB_multi_bind) {
+ if (GLContext::multi_bind_support) {
glBindTextures(first, count, textures_ + first);
glBindSamplers(first, count, samplers_ + first);
}