summaryrefslogtreecommitdiff
path: root/{{cookiecutter.project_name}}/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to '{{cookiecutter.project_name}}/src/main.cpp')
-rw-r--r--{{cookiecutter.project_name}}/src/main.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/{{cookiecutter.project_name}}/src/main.cpp b/{{cookiecutter.project_name}}/src/main.cpp
new file mode 100644
index 0000000..49b1fba
--- /dev/null
+++ b/{{cookiecutter.project_name}}/src/main.cpp
@@ -0,0 +1,47 @@
+#include "raylib.h"
+#include "imgui.h"
+#include "imgui_impl_opengl3.h"
+#include "imgui_impl_raylib.h"
+
+int main(int argc, char* argv[])
+{
+ int screenWidth = 1024;
+ int screenHeight = 768;
+
+ InitWindow(screenWidth, screenHeight, "{{cookiecutter.project_name}}");
+
+ SetTargetFPS(60);
+
+ ImGui::CreateContext();
+ ImGui::StyleColorsDark();
+
+ ImGui_ImplOpenGL3_Init();
+ ImGui_ImplRaylib_Init();
+
+ while (!WindowShouldClose())
+ {
+ ImGui_ImplOpenGL3_NewFrame();
+ ImGui_ImplRaylib_NewFrame();
+ ImGui::NewFrame();
+
+ BeginDrawing();
+
+ {
+ ClearBackground(RAYWHITE);
+
+ ImGui::ShowDemoWindow();
+
+ ImGui::Render();
+ ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
+ }
+
+ EndDrawing();
+ }
+
+ ImGui_ImplRaylib_Shutdown();
+ ImGui_ImplOpenGL3_Shutdown();
+
+ CloseWindow();
+
+ return 0;
+}