Skip to content

Commit

Permalink
Merge pull request WebPlatformForEmbedded#1068 from WebPlatformForEmb…
Browse files Browse the repository at this point in the history
…edded/aperezdc/wpe-2.28-glattriblink

[WPE] Always call glBindAttribLocation before glLinkProgram
  • Loading branch information
magomez authored Apr 5, 2023
2 parents d097460 + 08c4edf commit ba1641a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Source/WebKit/UIProcess/API/wpe/qt/WPEQtViewBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@ WPEQtViewBackend::WPEQtViewBackend(const QSizeF& size, EGLDisplay display, EGLCo
m_program = glFunctions->glCreateProgram();
glFunctions->glAttachShader(m_program, vertexShader);
glFunctions->glAttachShader(m_program, fragmentShader);
glFunctions->glLinkProgram(m_program);

glFunctions->glBindAttribLocation(m_program, 0, "pos");
glFunctions->glBindAttribLocation(m_program, 1, "texture");

glFunctions->glLinkProgram(m_program);
m_textureUniform = glFunctions->glGetUniformLocation(m_program, "u_texture");

static struct wpe_view_backend_exportable_fdo_egl_client exportableClient = {
Expand Down
3 changes: 2 additions & 1 deletion Tools/wpe/backends/WindowViewBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,10 +599,11 @@ WindowViewBackend::WindowViewBackend(uint32_t width, uint32_t height)
m_program = glCreateProgram();
glAttachShader(m_program, vertexShader);
glAttachShader(m_program, fragmentShader);
glLinkProgram(m_program);

glBindAttribLocation(m_program, 0, "pos");
glBindAttribLocation(m_program, 1, "texture");

glLinkProgram(m_program);
m_textureUniform = glGetUniformLocation(m_program, "u_texture");
}

Expand Down

0 comments on commit ba1641a

Please sign in to comment.