EGL and Gles2 cleanups and additions #460
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Best reviewed on a commit-by-commit basis.
Addresses some short-comings I found implementing smithay-egui.
6e1f6ab makes it possible to attach user_data to an
EGLContext
. Given that GL-resources like textures or buffers are local to a context, this is the obvious place to store them.e0ad187 makes it possible to retrieve the
EGLContext
of aGles2Renderer
to actually access the user_data from downstream.7ac8872 and 07bf1e5 expose rendering specifics of the
Gles2Frame
, that make it easier to correctly orientate and size externally drawn content.04f6434 allows downstream to retrieve the raw-egl handles, if they want to. We already supported that for the
EGLDevice
andEGLDisplay
anyway, and this is useful for example to hook up RenderDoc.08df10c fixes up the existing texture filtering code of the
Gles2Renderer
, which was previously not applied correctly.29b0b2b fixes resizing the window of the winit-backend in anvil, which broke with #423.
Finally 864b379 adds a utility function to transform
Rectangle
s and some tests.