35 throw std::runtime_error(
"Invalid background color");
42 throw std::runtime_error(
"Invalid window size");
48 engine.setEditorAddElementsCallback(initializer.editorAddElements);
59 if (r < 0 || r > 1 || g < 0 || g > 1 || b < 0 || b > 1) {
60 throw std::runtime_error(
"Invalid background color");
62 engine.bgColor[0] = r;
63 engine.bgColor[1] = g;
64 engine.bgColor[2] = b;
71 engine.objectManager.remove(objectNo);
Main API for chronos. Any applications should include this file.
GLFWwindow * window
This is the GLFW window reference that is used by the engine.
Chronos::Engine::Engine engine
The backend Vulkan engine, used for rendering the desired shapes and text.s.
Manager(Initializer initializer)
Constructor for chronos. The initalizer struct with the necessary options to be passed.
void removeObject(int objectNo)
int changeBackgroundColor(float r, float g, float b)
Changes the background color of the window.
GLFWwindow * getWindow()
Gets a reference to the GLFWWindow.
void drawFrame()
Draws the current frame to the window.
This struct contains the details for initialing the manager.