MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / get_text_renderer

Method get_text_renderer

src/host/glfw_canvas.cpp:675–690  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

673// they only touch plain GL state, not the viz layer.
674
675const oid::GLTextRenderer* GlfwCanvas::get_text_renderer() const {
676 if (!ready_) {
677 return nullptr; // GL not loaded yet
678 }
679 if (!text_renderer_init_attempted_) {
680 text_renderer_init_attempted_ = true; // one attempt, mutable members
681 if (auto atlas = oid::host::stb_glyph_atlas()) {
682 auto r =
683 std::make_unique<oid::GLTextRenderer>(*this, std::move(*atlas));
684 if (r->initialize()) {
685 text_renderer_ = std::move(r);
686 }
687 }
688 }
689 return text_renderer_.get();
690}
691
692} // namespace oid::host

Callers 2

draw_textMethod · 0.80
TESTFunction · 0.80

Calls 2

stb_glyph_atlasFunction · 0.85
initializeMethod · 0.45

Tested by 1

TESTFunction · 0.64