A cross-platform graphical application framework for Visual Effects and Games
Caution
This project is under heavy development and should not be used in a commerical project at this time.
Support for DirectX11 Support for MaterialX
Note
Project Dependencies will likely become more minimal in the future months
#include "Cherry/Base/App.h"
#include "Cherry/Base/Window.h"
#include "Cherry/Rendering/DX11/DX11Renderer.h"
#include "imgui.h"
int main() {
Cherry::Base::App app("Hello"); // Creates the app
Cherry::Rendering::DX11Renderer renderer; // Creates a renderer
renderer.g_registerDPIScale(); // Registers the dpi scale for ImGui
Cherry::Base::Window window(Cherry::Base::Window::NATIVE_WINDOWS, "Hello", 10, 10); // Creates a window
renderer.g_createDevice(window.hwnd); // Creates a device
renderer.g_initImGui(window.hwnd); // Initialization of ImGui
while (app.g_isAppRunning) { // Loops while the app is running
window.g_peekMessages(); // Peeks through event messages
if (!app.g_isAppRunning) { // Stop the loop if its not rendering
break;
}
renderer.g_newFrame(); // Creates a ImGui Frame
bool open = true;
ImGui::ShowDemoWindow(&open);
renderer.g_resize(); // On Resize
renderer.g_render(); // Renders the result
}
renderer.g_cleanupDeviceD3D(); // Cleans up the device
}