mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 06:00:05 +00:00
macOS does not populate the the OpenGL 3.0 compatibility functions
This commit is contained in:
parent
ec06cc62e1
commit
e51fd8b77b
5 changed files with 26 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,10 +56,12 @@ gl::OpenGLFunctions& GlContext::gl()
|
|||
return *p->gl_;
|
||||
}
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
QOpenGLFunctions_3_0& GlContext::gl30()
|
||||
{
|
||||
return *p->gl30_;
|
||||
}
|
||||
#endif
|
||||
|
||||
std::uint64_t GlContext::texture_buffer_count() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -25,7 +25,10 @@ public:
|
|||
GlContext& operator=(GlContext&&) noexcept;
|
||||
|
||||
gl::OpenGLFunctions& gl();
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
QOpenGLFunctions_3_0& gl30();
|
||||
#endif
|
||||
|
||||
std::uint64_t texture_buffer_count() const;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue