kick
|
00001 // 00002 // PlatformBinding.h 00003 // KickCPP 00004 // 00005 // Created by morten on 8/10/13. 00006 // Copyright (c) 2013 Morten Nobel-Joergensen. All rights reserved. 00007 // 00008 00009 #pragma once 00010 00011 #include <iostream> 00012 #include <functional> 00013 #include <string> 00014 00015 #include "glm/glm.hpp" 00016 #include "kick/core/event.h" 00017 #include "kick/core/touch_input.h" 00018 #include "kick/context/window_config.h" 00019 00020 namespace kick { 00021 class MouseInput; 00022 class KeyInput; 00023 00024 class Context { 00025 public: 00026 Context(); 00027 virtual ~Context(){} 00028 virtual bool init(int &argc, char **argv) = 0; 00029 virtual bool showWindow(const WindowConfig& config) = 0; 00030 virtual void swapBuffer() = 0; 00031 virtual void mainLoop() = 0; 00032 00033 virtual bool isFullscreen() = 0; 00034 virtual void setFullscreen(bool fullscreen) = 0; 00035 virtual void setWindowTitle(std::string title) = 0; 00036 virtual std::string getWindowTitle() = 0; 00040 virtual std::string getBasePath(); 00041 glm::ivec2 getContextSurfaceDim(); 00042 Event<glm::ivec2> contextSurfaceSize; 00043 std::string getGLSLPrefix(); 00044 00045 protected: 00046 glm::ivec2 contextSurfaceDim = glm::ivec2{512, 512}; 00047 }; 00048 };