mosra / magnum-integration

Integration libraries for the Magnum C++11 graphics engine
https://magnum.graphics/
Other
97 stars 44 forks source link

ImGuiIntegration: make ImFontAtlas texture accessible #61

Closed rune-scape closed 4 years ago

rune-scape commented 4 years ago

Fixes #60

codecov-io commented 4 years ago

Codecov Report

Merging #61 into master will decrease coverage by 0.57%. The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #61      +/-   ##
==========================================
- Coverage   74.55%   73.97%   -0.58%     
==========================================
  Files          21       21              
  Lines         900      903       +3     
==========================================
- Hits          671      668       -3     
- Misses        229      235       +6
Impacted Files Coverage Δ
src/Magnum/ImGuiIntegration/Context.h 100% <ø> (ø) :arrow_up:
src/Magnum/ImGuiIntegration/Context.cpp 82.28% <66.66%> (-0.86%) :arrow_down:
src/Magnum/DartIntegration/ConvertShapeNode.cpp 93.92% <0%> (-2.21%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 43e86c2...d66065c. Read the comment docs.

mosra commented 4 years ago

Merged as b3c65b91b3d13591244dc8be75eb5f878ec70d68, thank you! :)

rune-scape commented 4 years ago

btw i have been testing with the ternary statement simplified, and everything works

Squareys commented 4 years ago

There is a tiny bug in here:

When the Context is moved, the pointer to _texture is invalidated so that the ImGui font TexID points to invalid memory. The TexID needs to be updated in Context(Context&&).

I will follow up with a tiny PR.