Skip to content

Shader.set_uniform_texture() texture borrow lifetime is too restrictive #213

@Lichtso

Description

@Lichtso

Borrowing the texture for its entire lifetime renders this method unusable:

  1. It means the texture can not be updated anymore.
  2. Even if the texture is created just for the call, it can not be discarded anymore because: borrow might be used here, when 'shader' is dropped and runs the 'Drop' code for type 'sfml::graphics::Shader'
  3. Thus, the shader needs to be recompiled for every texture update, which is not acceptable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions