mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-04 12:55:22 +12:00
More iOS progress
This commit is contained in:
parent
1948bea209
commit
9bc50a4b9c
6 changed files with 67 additions and 26 deletions
|
@ -1,3 +1,4 @@
|
|||
#pragma once
|
||||
|
||||
void iosCreateEmulator();
|
||||
void iosCreateEmulator();
|
||||
void iosRunFrame(void* drawable, void* drawableTexture);
|
|
@ -86,6 +86,10 @@ class Renderer {
|
|||
// Called to notify the core to use OpenGL ES and not desktop GL
|
||||
virtual void setupGLES() {}
|
||||
|
||||
// Only relevant for Metal renderer on iOS
|
||||
// Passes a SwiftUI MTKView Drawable & its texture to the renderer
|
||||
virtual void setMTKDrawable(void* drawable, void* drawableTexture) {};
|
||||
|
||||
// This function is called on every draw call before parsing vertex data.
|
||||
// It is responsible for things like looking up which vertex/fragment shaders to use, recompiling them if they don't exist, choosing between
|
||||
// ubershaders and shadergen, and so on.
|
||||
|
|
|
@ -42,11 +42,16 @@ class RendererMTL final : public Renderer {
|
|||
virtual void initGraphicsContext([[maybe_unused]] GL::Context* context) override {}
|
||||
#endif
|
||||
|
||||
private:
|
||||
CA::MetalLayer* metalLayer;
|
||||
virtual void setMTKDrawable(void* drawable, void* drawableTexture) override;
|
||||
|
||||
MTL::Device* device;
|
||||
MTL::CommandQueue* commandQueue;
|
||||
private:
|
||||
CA::MetalLayer* metalLayer = nullptr;
|
||||
|
||||
CA::MetalDrawable* metalDrawable = nullptr;
|
||||
MTL::Texture* drawableTexture = nullptr;
|
||||
|
||||
MTL::Device* device = nullptr;
|
||||
MTL::CommandQueue* commandQueue = nullptr;
|
||||
|
||||
Metal::CommandEncoder commandEncoder;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue