34 lines
737 B
Objective-C
34 lines
737 B
Objective-C
//
|
|
// Created by Vicente Ferrari Smith on 26.02.26.
|
|
//
|
|
|
|
#ifndef V_METAL_H
|
|
#define V_METAL_H
|
|
|
|
#include <GLFW/glfw3.h>
|
|
#define GLFW_EXPOSE_NATIVE_COCOA
|
|
#import <GLFW/glfw3native.h>
|
|
|
|
#include <Metal/Metal.hpp>
|
|
#include <QuartzCore/CAMetalLayer.hpp>
|
|
#include <QuartzCore/QuartzCore.hpp>
|
|
|
|
struct Device {
|
|
MTL::Device *device;
|
|
};
|
|
|
|
struct PlatformTexture {
|
|
MTL::Texture *texture;
|
|
};
|
|
|
|
struct Queue {
|
|
MTL::CommandQueue *queue;
|
|
};
|
|
|
|
void load_metal_shader(const std::string &shader_path,
|
|
const std::string &vertex_fn_name,
|
|
const std::string &fragment_fn_name,
|
|
MTL::Function **vertex_shader,
|
|
MTL::Function **fragment_shader);
|
|
|
|
#endif //V_METAL_H |