Chronos 0.0
A advanced 2D rendering and animation system
Loading...
Searching...
No Matches
editorMain.cpp File Reference
#include "editorManager.hpp"
#include "logging.hpp"
Include dependency graph for editorMain.cpp:

Go to the source code of this file.

Functions

void addElements ()
 
int main ()
 

Variables

Chronos::Editor::EditorManager editorManager
 

Function Documentation

◆ addElements()

void addElements ( )

Definition at line 27 of file editorMain.cpp.

Chronos::Editor::EditorManager editorManager

References Chronos::Editor::EditorManager::addElements(), and editorManager.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( )

Definition at line 29 of file editorMain.cpp.

30{
32 initializer.WindowWidth = 800;
33 initializer.WindowHeight = 600;
34 initializer.BackgroundColor[0] = 0;
35 initializer.BackgroundColor[1] = 0;
36 initializer.BackgroundColor[2] = 0;
37 initializer.editorAddElements = addElements;
38
39 Chronos::Manager::Manager manager(initializer);
40 LOG(2, "Manager created.")
41 editorManager.init(&manager);
42 LOG(3, "EditorManager created.")
43
44 // Chronos::Manager::ShapeParams shapeParams;
45 // shapeParams.color = {1.0f, 1.0f, 1.0f};
46 // shapeParams.xSize = 0.5f;
47 // shapeParams.ySize = 0.5f;
48 // int shapeNo = manager.addPolygon(shapeParams, {false, true});
49
50 // int keyframeNo = manager.addKeyframeVariable({{0, 0}, {400, 0.1}, {800,
51 // 0.5}, {1200, 0.4}, {1600, 0.2}});
52
53 while (!glfwWindowShouldClose(manager.getWindow())) {
54 if (glfwGetKey(manager.getWindow(), GLFW_KEY_ESCAPE) == GLFW_PRESS) {
55 glfwSetWindowShouldClose(manager.getWindow(), true);
56 }
57 // shapeParams.x = manager.keyframeGetVariable(keyframeNo);
58 // manager.updatePolygon(shapeNo, shapeParams);
59 manager.drawFrame();
60 LOG(4, "Frame drawn.")
61 }
62 LOG(2, "Exited rendering loop, closing program.")
63 return 0;
64}
The main manager of chronos.
Definition chronos.hpp:109
void addElements()
#define LOG(LEVEL, MESSAGE)
Definition logging.hpp:60
This struct contains the details for initialing the manager.
Definition chronos.hpp:46

References addElements(), Chronos::Manager::Initializer::BackgroundColor, Chronos::Manager::Manager::drawFrame(), editorManager, Chronos::Manager::Manager::getWindow(), Chronos::Editor::EditorManager::init(), LOG, Chronos::Manager::Initializer::WindowHeight, and Chronos::Manager::Initializer::WindowWidth.

Here is the call graph for this function:

Variable Documentation

◆ editorManager

Definition at line 25 of file editorMain.cpp.