Example #1
0
int main() {
	
	BaseApplication* app = new Application2D();
	if (app->startup())
		app->run();
	app->shutdown();

	return 0;
}
Example #2
0
int main(int argc, char *argv[]) {
	BaseApplication app;
	app.go();

	/*
	Root *root = new Root("resources/plugins.cfg");


	root->showConfigDialog();
	root->initialise(false);

	SceneManager *sceneMgr = root->createSceneManager(ST_GENERIC, 2, INSTANCING_CULLING_THREADED, "MySceneManager");
	RenderWindow *window = root->createRenderWindow("RenderTargetName", 800, 600, false);
	Camera *camera = sceneMgr->createCamera("MainCamera");
	Viewport *vp = window->addViewport();

	sceneMgr->setAmbientLight(Ogre::ColourValue(0.5, 0.5, 0.5));
	Ogre::Entity* ogreEntity = sceneMgr->createEntity("ogrehead.mesh");
	Ogre::SceneNode* ogreNode = sceneMgr->getRootSceneNode()->createChildSceneNode();
	ogreNode->attachObject(ogreEntity);

	auto input = getForWindow(window);


	SimpleKeyListener* keyListener = new SimpleKeyListener();
	input.keyboard->setEventCallback(keyListener);

	SimpleMouseListener* mouseListener = new SimpleMouseListener();
	input.mouse->setEventCallback(mouseListener);

	MyFrameListener *mfl = new MyFrameListener(input.keyboard, input.mouse);
	root->addFrameListener(mfl);

	root->startRendering();

	uint64_t i = 42u;
	cout << "Configured! " << i << endl;*/

	return 0;
}
Example #3
0
int main()
{
	BaseApplication app;
	app.run();
	return 0;
}
Example #4
0
void BaseApplication::_OnKeyfun(GLFWwindow* window, int key, int scancode, int action, int mods) {
	BaseApplication* app = static_cast<BaseApplication*>(glfwGetWindowUserPointer(window));
	app->onKey(key, action);
}
Example #5
0
void BaseApplication::_OnMouseposfun(GLFWwindow* window, double x, double y) {
	BaseApplication* app = static_cast<BaseApplication*>(glfwGetWindowUserPointer(window));
	app->onMousepos(x, y);
}
Example #6
0
void BaseApplication::_OnMousebuttonfun(GLFWwindow* window, int button, int action, int mods) {
	BaseApplication* app = static_cast<BaseApplication*>(glfwGetWindowUserPointer(window));
	app->onMousebutton(button, action);
}
Example #7
0
void BaseApplication::_OnWindowsizefun(GLFWwindow* window, int w, int h) {
	BaseApplication* app = static_cast<BaseApplication*>(glfwGetWindowUserPointer(window));
	app->onWindowSize(w, h);
}