mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-31 07:37:24 +00:00
Remove BorrowedOpenGLTexture from the public API again and just provide a factory function in slint::Image
This commit is contained in:
parent
ce20b43eb3
commit
e7320607a3
5 changed files with 49 additions and 75 deletions
|
@ -311,7 +311,7 @@ private:
|
|||
glVertexAttribPointer(position_location, 2, GL_FLOAT, false, 8, 0);
|
||||
}
|
||||
|
||||
slint::BorrowedOpenGLTexture render(float red, float green, float blue, int width, int height)
|
||||
slint::Image render(float red, float green, float blue, int width, int height)
|
||||
{
|
||||
ScopedVBOBinding savedVBO(vbo);
|
||||
ScopedVAOBinding savedVAO(vao);
|
||||
|
@ -342,9 +342,10 @@ private:
|
|||
|
||||
glUseProgram(0);
|
||||
|
||||
slint::BorrowedOpenGLTexture resultTexture(next_texture->texture,
|
||||
{ static_cast<uint32_t>(next_texture->width),
|
||||
static_cast<uint32_t>(next_texture->height) });
|
||||
auto resultTexture = slint::Image::create_from_borrowed_gl_2d_rgba_texture(
|
||||
next_texture->texture,
|
||||
{ static_cast<uint32_t>(next_texture->width),
|
||||
static_cast<uint32_t>(next_texture->height) });
|
||||
|
||||
std::swap(next_texture, displayed_texture);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue