8 #ifndef METAL_COMMON_H__ 9 #define METAL_COMMON_H__ 11 #import <Metal/Metal.h> 12 #import <MetalKit/MetalKit.h> 16 #include "../drivers_shader/slang_process.h" 19 #include "../../config.h" 27 #pragma mark - Classes 31 @property (nonatomic, readonly) RPixelFormat
format;
32 @property (nonatomic, readonly) RTextureFilter
filter;
34 @property (nonatomic, readwrite) CGRect
frame;
35 @property (nonatomic, readwrite) CGSize
size;
36 @property (nonatomic, readonly) ViewDrawState
drawState;
40 - (
void)setFilteringIndex:(
int)index smooth:(
bool)smooth;
41 - (
BOOL)setShaderFromPath:(NSString *)path;
42 - (
void)updateFrame:(
void const *)src pitch:(NSUInteger)pitch;
43 - (
bool)readViewport:(
uint8_t *)buffer isIdle:(
bool)isIdle;
50 @property (nonatomic, readonly)
bool hasFrame;
51 @property (nonatomic, readwrite)
bool enabled;
52 @property (nonatomic, readwrite)
float alpha;
56 - (
void)updateWidth:(
int)width
58 format:(RPixelFormat)format
59 filter:(RTextureFilter)filter;
64 @property (nonatomic, readwrite)
bool enabled;
68 - (
void)updateVertexX:(
float)x y:(
float)y w:(
float)w h:(
float)h index:(NSUInteger)index;
69 - (
void)updateTextureCoordsX:(
float)x y:(
float)y w:(
float)w h:(
float)h index:(NSUInteger)index;
70 - (
void)updateAlpha:(
float)alpha index:(NSUInteger)index;
76 @property (nonatomic, readwrite)
bool keepAspect;
78 @property (nonatomic, readonly)
FrameView *frameView;
81 @property (nonatomic, readonly)
Context *context;
82 @property (nonatomic, readonly)
Uniforms *viewportMVP;
86 inputData:(
void **)inputData;
91 height:(
unsigned)height
98 - (
void)setNeedsResize;
99 - (
void)setViewportWidth:(
unsigned)width height:(
unsigned)height forceFull:(
BOOL)forceFull allowRotate:(
BOOL)allowRotate;
100 - (
void)setRotation:(
unsigned)rotation;
Definition: MenuDisplay.h:9
GLuint shader
Definition: glext.h:6670
RETRO_BEGIN_DECLS MTLPixelFormat glslang_format_to_metal(glslang_format fmt)
Definition: metal_common.m:1461
ViewDrawState drawState
Definition: metal_common.h:36
#define const
Definition: zconf.h:217
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
Definition: ffmpeg_core.c:151
GLsizeiptr size
Definition: glext.h:6559
uint64_t frameCount
Definition: metal_common.h:38
static const bool fullscreen
Definition: config.def.h:108
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
glslang_format
Definition: glslang_util.h:22
typedef bool(RETRO_CALLCONV *retro_replace_image_index_t)(unsigned index
Definition: video_shader_parse.h:143
Definition: video_driver.h:405
Definition: input_driver.h:132
Definition: metal_common.h:29
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:8417
MTLPixelFormat SelectOptimalPixelFormat(MTLPixelFormat fmt)
Definition: metal_common.m:1510
Definition: video_driver.h:332
BOOL visible
Definition: metal_common.h:33
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
GLfloat GLfloat GLfloat alpha
Definition: glext.h:6290
unsigned int BOOL
Definition: gctypes.h:51
Definition: video_driver.h:686
Definition: metal_common.h:63
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glext.h:6293
Definition: input_overlay.h:98
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7672
Definition: ShaderTypes.h:70
Definition: metal_common.h:48
unsigned __int64 uint64_t
Definition: stdint.h:136
Context contains the render state used by various components.
Definition: Context.h:26
unsigned char uint8_t
Definition: stdint.h:124
Definition: metal_common.h:73