macOS does not populate the the OpenGL 3.0 compatibility functions

This commit is contained in:
Dan Paulat 2025-06-22 22:31:14 -05:00
parent ec06cc62e1
commit e51fd8b77b
5 changed files with 26 additions and 0 deletions

View file

@ -162,7 +162,10 @@ void PlacefileIcons::set_thresholded(bool thresholded)
void PlacefileIcons::Initialize()
{
gl::OpenGLFunctions& gl = p->context_->gl();
#if !defined(__APPLE__)
auto& gl30 = p->context_->gl30();
#endif
p->shaderProgram_ = p->context_->GetShaderProgram(
{{GL_VERTEX_SHADER, ":/gl/geo_texture2d.vert"},
@ -253,7 +256,11 @@ void PlacefileIcons::Initialize()
gl.glEnableVertexAttribArray(6);
// aDisplayed
#if !defined(__APPLE__)
gl30.glVertexAttribI1i(7, 1);
#else
glVertexAttribI1i(7, 1);
#endif
p->dirty_ = true;
}

View file

@ -140,7 +140,10 @@ void PlacefileImages::set_thresholded(bool thresholded)
void PlacefileImages::Initialize()
{
gl::OpenGLFunctions& gl = p->context_->gl();
#if !defined(__APPLE__)
auto& gl30 = p->context_->gl30();
#endif
p->shaderProgram_ = p->context_->GetShaderProgram(
{{GL_VERTEX_SHADER, ":/gl/geo_texture2d.vert"},
@ -222,7 +225,11 @@ void PlacefileImages::Initialize()
gl.glEnableVertexAttribArray(6);
// aDisplayed
#if !defined(__APPLE__)
gl30.glVertexAttribI1i(7, 1);
#else
glVertexAttribI1i(7, 1);
#endif
p->dirty_ = true;
}

View file

@ -128,7 +128,10 @@ void PlacefileLines::set_thresholded(bool thresholded)
void PlacefileLines::Initialize()
{
gl::OpenGLFunctions& gl = p->context_->gl();
#if !defined(__APPLE__)
auto& gl30 = p->context_->gl30();
#endif
p->shaderProgram_ = p->context_->GetShaderProgram(
{{GL_VERTEX_SHADER, ":/gl/geo_texture2d.vert"},
@ -207,7 +210,11 @@ void PlacefileLines::Initialize()
gl.glEnableVertexAttribArray(6);
// aDisplayed
#if !defined(__APPLE__)
gl30.glVertexAttribI1i(7, 1);
#else
glVertexAttribI1i(7, 1);
#endif
p->dirty_ = true;
}