Added first pass on swap chain. Still needs Render Target View and various stuff.
+ Reformat all files
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user