diff --git a/Editor/main.cpp b/Editor/main.cpp index 4eab3686e..bc3cc0c68 100644 --- a/Editor/main.cpp +++ b/Editor/main.cpp @@ -11,9 +11,9 @@ struct Application : boo::IApplicationCallback { HECL::Runtime::FileStoreManager m_fileMgr; Specter::FontCache m_fontCache; - Specter::RootView m_rootView; - Retro::CVarManager m_cvarManager; boo::IWindow* m_mainWindow; + Specter::ViewSystem m_viewSystem; + Retro::CVarManager m_cvarManager; Zeus::CColor m_clearColor; bool m_running = true; @@ -27,13 +27,11 @@ struct Application : boo::IApplicationCallback Application() : m_fileMgr(_S("rude")), m_fontCache(m_fileMgr), - m_rootView(m_fontCache), m_cvarManager(m_fileMgr){} int appMain(boo::IApplication* app) { m_mainWindow = app->newWindow(_S("RUDE")); - m_rootView.setWindow(m_mainWindow, 1.0f); m_cvarManager.serialize(); Retro::CVar* tmp = m_cvarManager.findCVar("r_clearcolor"); Retro::CVar::ListenerFunc listen = std::bind(&Application::onCVarModified, this, std::placeholders::_1); @@ -41,9 +39,15 @@ struct Application : boo::IApplicationCallback tmp->addListener(listen); boo::IGraphicsDataFactory* gf = m_mainWindow->getMainContextDataFactory(); - m_fontCache.prepMainFont(gf, false, 10.0, 72); + m_viewSystem.init(gf, &m_fontCache); + Specter::FontTag mainFont = m_fontCache.prepMainFont(gf, false, 10.0, 72); m_fontCache.closeBuiltinFonts(); + Specter::RootView rootView(m_viewSystem, m_mainWindow); + + Specter::TextView textView(m_viewSystem, mainFont); + textView.typesetGlyphs("Hello, World!"); + while (m_running) { m_cvarManager.update(); diff --git a/hecl b/hecl index e6b2da35b..e40b5138e 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit e6b2da35bd713ce87cff07a1ddc16364e9fc3d6b +Subproject commit e40b5138ead775b5583bf68cd0b14f5161714c78 diff --git a/libSpecter b/libSpecter index 5439312ef..304290728 160000 --- a/libSpecter +++ b/libSpecter @@ -1 +1 @@ -Subproject commit 5439312ef6ed189206080b7282fc91dcdaa2a1d8 +Subproject commit 304290728738be2aa7eb81b0e47b066cdcd2f5e6