Added first pass on swap chain. Still needs Render Target View and various stuff.

+ Reformat all files
This commit is contained in:
2025-02-09 22:19:17 -05:00
parent d5e09e28bf
commit d90a0bdf83
37 changed files with 944 additions and 636 deletions

View File

@@ -31,18 +31,28 @@ void Win32EditorApplication::Init()
MainWindow = CreatePlatformWindow("Juliet Editor", 1280, 720);
// TODO : Assign the graphics device to the main window (and detach)
Running = MainWindow != nullptr && GraphicsDevice != nullptr;
DynamicLibrary = LoadDynamicLibrary("Game.dll");
if (Running)
{
AttachToWindow(GraphicsDevice, MainWindow);
Game = LoadDynamicLibrary("Game.dll");
}
}
void Win32EditorApplication::Shutdown()
{
Log(LogLevel::Message, LogCategory::Editor, "Shutdown Editor Application...");
UnloadDynamicLibrary(DynamicLibrary);
if (Game)
{
UnloadDynamicLibrary(Game);
}
if (MainWindow && GraphicsDevice)
{
DetachFromWindow(GraphicsDevice, MainWindow);
}
if (MainWindow)
{

View File

@@ -8,7 +8,7 @@ namespace Juliet
{
struct GraphicsDevice;
struct Window;
}
} // namespace Juliet
class Win32EditorApplication : public Juliet::IApplication
{
@@ -19,11 +19,11 @@ class Win32EditorApplication : public Juliet::IApplication
bool IsRunning() override;
private:
Juliet::Window* MainWindow = {};
Juliet::Window* MainWindow = {};
Juliet::GraphicsDevice* GraphicsDevice = {};
Juliet::DynamicLibrary* DynamicLibrary = {};
Juliet::DynamicLibrary* Game = {};
bool Running = false;
bool Running = false;
};
Win32EditorApplication& GetEditorApplication();