Skip to content

Commit

Permalink
fix some todos (context/flags)
Browse files Browse the repository at this point in the history
  • Loading branch information
gucio321 committed Sep 17, 2023
1 parent c3ab91a commit 51b5435
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 6 additions & 5 deletions Context.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ func CreateContext(b imgui.Backend[imgui.GLFWWindowFlags]) *context {

// Create font
if len(result.FontAtlas.defaultFonts) == 0 {
io := result.IO()
io.Fonts().AddFontDefault()
// TODO
// fontAtlas, _, _, _ := io.Fonts().GetTextureDataAsRGBA32()
// r.SetFontTexture(fontAtlas)
fonts := result.IO().Fonts()
fonts.AddFontDefault()
fontTextureImg, w, h, _ := fonts.GetTextureDataAsRGBA32()
tex := Context.backend.CreateTexture(fontTextureImg, int(w), int(h))
fonts.SetTexID(tex)
fonts.SetTexReady(true)
} else {
result.FontAtlas.shouldRebuildFontAtlas = true
}
Expand Down
1 change: 0 additions & 1 deletion Flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,6 @@ const (
)

// SliderFlags represents imgui.SliderFlags
// TODO: Hard-reffer to these constants.
type SliderFlags imgui.SliderFlags

// slider flags.
Expand Down

0 comments on commit 51b5435

Please sign in to comment.