Update some things.
This commit is contained in:
parent
f215bc3742
commit
f9d6e7a70a
35 changed files with 575 additions and 905 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include <webgpu/webgpu.h>
|
||||
|
||||
#include <Shared.h>
|
||||
#include "../Client.h"
|
||||
#include "../Platform/Window.h"
|
||||
|
||||
namespace Artifact {
|
||||
|
|
@ -18,7 +19,7 @@ public:
|
|||
virtual void render(WGPUTextureView nextTexture, WGPUCommandEncoder encoder) {}
|
||||
};
|
||||
|
||||
class Graphics: public BaseSubsystem, public Engine<GraphicsSubsystem> {
|
||||
class Graphics: public ClientSubsystem, public Engine<GraphicsSubsystem> {
|
||||
public:
|
||||
WGPUInstance instance = nullptr;
|
||||
WGPUSurface surface = nullptr;
|
||||
|
|
@ -29,14 +30,11 @@ public:
|
|||
WGPUTextureView depthTextureView = nullptr;
|
||||
WGPUQueue queue = nullptr;
|
||||
|
||||
Window * window;
|
||||
WindowImpl * window;
|
||||
|
||||
void init() override;
|
||||
void deinit() override;
|
||||
void render() override;
|
||||
void onSubsystemAdd(GraphicsSubsystem * system) {
|
||||
system->graphics = this;
|
||||
}
|
||||
|
||||
WGPUTexture createTextureFromData(const void* data, uint32_t width, uint32_t height);
|
||||
WGPUTexture createTextureFromFile(const char* file);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue