Coder Social home page Coder Social logo

Comments (2)

ducphamhong avatar ducphamhong commented on September 21, 2024

Hello @Joilnen

Sorry because i not yet test it on MacOS.

The editor run on Windows/Linux load resources directy from path.
But MacOS need add all to .zip and add to XCode project
At the current version i need do something to load it, but i have not yet did it.

Thanks.

from skylicht-engine.

ducphamhong avatar ducphamhong commented on September 21, 2024

You can edit the file: SkylichtEditor.cpp
But i think the editor is not yet ready to run on MacOS

void SkylichtEditor::onUpdate()
{
	float currentTime = (float)getIrrlichtDevice()->getTimer()->getTime();

	switch (m_editorState)
	{
	case Startup:
		// init engine
		m_editorState = InitGUI;
		break;
	case InitGUI:
	{
		// import resources
		CBaseApp* app = getApplication();
		app->getFileSystem()->addFileArchive(app->getBuiltInPath("BuiltIn.zip"), false, false); << ADD THIS LINE
		app->getFileSystem()->addFileArchive(app->getBuiltInPath("Editor.zip"), false, false); << ADD THIS LINE

		// load gui shader
		CShaderManager* shaderMgr = CShaderManager::getInstance();
		shaderMgr->initGUIShader();

		// init editor gui		
		u32 w = app->getWidth();
		u32 h = app->getHeight();
		Editor::GUI::CGUIContext::initGUI((float)w, (float)h);

		m_editor = Editor::CEditor::createGetInstance();
		m_editorState = InitEngine;
	}
	break;
	case InitEngine:
	{
		CShaderManager::getInstance()->initBasicShader();
		CShaderManager::getInstance()->initSGDeferredShader();

		// import project		
		m_editor->initImportGUI();

		// change state loading
		m_editorState = Import;
	}
	break;
	case Import:
	{
		// loading project
		if (m_editor->isImportFinish() == true)
		{
			m_editor->closeImportDialog();

			if (m_editor->isUIInitiate() == false)
				m_editor->initEditorGUI();
			else
				m_editor->refresh();

			m_editorState = Running;
		}

		// running
		m_editor->update();
		Editor::GUI::CGUIContext::update(currentTime);
	}
	break;
	default:
		// running
		m_editor->update();
		Editor::GUI::CGUIContext::update(currentTime);
		break;
	}
}

from skylicht-engine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.