Multiple changes to prepare for the basic render engine.
* Rendering 2 cubes * per cube transform panels * Updated TODO.md * Updated README.md
This commit is contained in:
@ -1,106 +1,53 @@
|
||||
#include "BarinkEngine.h"
|
||||
#include <imgui.h>
|
||||
|
||||
extern void Start(int argc, char* argv[]);
|
||||
extern void Start();
|
||||
extern void Update();
|
||||
extern void ImmediateGraphicsDraw();
|
||||
extern void Stop();
|
||||
|
||||
using namespace BarinkEngine;
|
||||
void DrawMyGUI();
|
||||
|
||||
BarinkWindow* MainWindow;
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
|
||||
// Startup services
|
||||
MainWindow = new BarinkWindow(800, 600);
|
||||
BarinkWindow MainWindow = BarinkWindow(800, 600);
|
||||
|
||||
Renderer renderer = Renderer();
|
||||
InputManager InputSystem = InputManager();
|
||||
|
||||
InputSystem.attach(&MainWindow);
|
||||
|
||||
InputSystem.attach(MainWindow);
|
||||
|
||||
GUIManager GUISystem = GUIManager(MainWindow);
|
||||
|
||||
|
||||
|
||||
GUIManager GUISystem = GUIManager(&MainWindow);
|
||||
|
||||
// First call to setup game
|
||||
Start(argc, argv);
|
||||
|
||||
Start();
|
||||
|
||||
// Runtime loop
|
||||
while (!MainWindow->WindowShouldClose()) {
|
||||
while (!MainWindow.WindowShouldClose()) {
|
||||
InputSystem.PollEvents();
|
||||
|
||||
Update();
|
||||
|
||||
|
||||
renderer.Render();
|
||||
|
||||
|
||||
DrawMyGUI();
|
||||
ImmediateGraphicsDraw();
|
||||
|
||||
GUISystem.Render();
|
||||
|
||||
|
||||
|
||||
|
||||
MainWindow->SwapBuffers();
|
||||
MainWindow.SwapBuffers();
|
||||
}
|
||||
|
||||
|
||||
// Shutdown game
|
||||
|
||||
Stop();
|
||||
|
||||
|
||||
// Shutdown Services
|
||||
delete MainWindow;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void WARN(std::string message) {
|
||||
spdlog::warn(message);
|
||||
}
|
||||
|
||||
|
||||
void DrawMyGUI() {
|
||||
ImGui::NewFrame();
|
||||
|
||||
ImGui::Begin("Transform");
|
||||
ImGui::Text("Cube");
|
||||
/*
|
||||
ImGui::InputFloat3("Position:", (float*)nullptr);
|
||||
ImGui::InputFloat3("Rotation:", (float*)nullptr);
|
||||
ImGui::InputFloat3("Scale:", (float*)nullptr);
|
||||
|
||||
*/
|
||||
|
||||
ImGui::End();
|
||||
|
||||
ImGui::Begin("Camera");
|
||||
|
||||
//ImGui::SliderFloat("Zoom:", &NULL, 10, 190);
|
||||
|
||||
ImGui::End();
|
||||
|
||||
|
||||
ImGui::Begin("Scripting!!");
|
||||
|
||||
//ImGui::InputTextMultiline("Lua Script", nullptr, 255);
|
||||
//runCode = ImGui::Button("Run");
|
||||
|
||||
|
||||
ImGui::End();
|
||||
|
||||
|
||||
ImGui::ShowDemoWindow();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user