Initial commit.
This commit is contained in:
commit
74c23c0ad5
57 changed files with 3491 additions and 0 deletions
40
Client/Client.h
Normal file
40
Client/Client.h
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "Shared.h"
|
||||
#include <Settings.h>
|
||||
|
||||
namespace Artifact {
|
||||
|
||||
class ClientSubsystem;
|
||||
class WindowImpl;
|
||||
|
||||
/// The client class.
|
||||
class Client: public Engine<ClientSubsystem> {
|
||||
public:
|
||||
WindowImpl * window = nullptr;
|
||||
Settings settings;
|
||||
|
||||
Client() : settings(getClientConfigPath()) {}
|
||||
|
||||
void addDefaultSubsystems();
|
||||
void initDefault();
|
||||
/// Initializes the client. This includes opening a window, creating a WebGPU device, etc.
|
||||
void init();
|
||||
/// Runs a single iteration of the render loop.
|
||||
void render();
|
||||
/// Runs a single iteration of the tick loop.
|
||||
void tick();
|
||||
/// Runs the client.
|
||||
void run();
|
||||
};
|
||||
|
||||
class ClientSubsystem: public BaseSubsystem {
|
||||
public:
|
||||
Client * client = nullptr;
|
||||
virtual void render() {}
|
||||
virtual void tick() {}
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue