WIP: Sample window
This commit is contained in:
@@ -16,10 +16,12 @@
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <imgui.h>
|
||||
#include "raylib.h"
|
||||
#include <raylib.h>
|
||||
#include <rlImGui.h>
|
||||
|
||||
int main(int ac, char **av) {
|
||||
InitWindow(1920, 1080, &av[0][2]);
|
||||
rlImGuiSetup(true);
|
||||
|
||||
// Initializing a camera
|
||||
Camera camera = {0};
|
||||
@@ -40,6 +42,8 @@ int main(int ac, char **av) {
|
||||
|
||||
DisableCursor();
|
||||
|
||||
bool test_window = true;
|
||||
|
||||
while (!WindowShouldClose()) {
|
||||
// Update
|
||||
UpdateCamera(&camera, CAMERA_FREE);
|
||||
@@ -58,9 +62,16 @@ int main(int ac, char **av) {
|
||||
EndMode3D();
|
||||
|
||||
DrawFPS(10, 10);
|
||||
rlImGuiBegin();
|
||||
// Test window
|
||||
ImGui::Begin("test", &test_window, ImGuiWindowFlags_None);
|
||||
ImGui::Text("test");
|
||||
ImGui::End();
|
||||
rlImGuiEnd();
|
||||
EndDrawing();
|
||||
}
|
||||
} // Unload model
|
||||
rlImGuiShutdown();
|
||||
CloseWindow();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user