orca/src/mtl_renderer.h

54 lines
969 B
C
Raw Normal View History

/************************************************************//**
*
* @file: mtl_renderer.h
* @author: Martin Fouilleul
* @date: 01/08/2022
* @revision:
*
*****************************************************************/
#ifndef __MTL_RENDERER_H_
#define __MTL_RENDERER_H_
#include<simd/simd.h>
typedef enum {
MG_MTL_LINE,
} mg_mtl_seg_kind;
typedef enum {
MG_MTL_BL, // curve on bottom left
MG_MTL_BR, // curve on bottom right
MG_MTL_TL, // curve on top left
MG_MTL_TR // curve on top right
} mg_mtl_seg_config;
typedef enum {
MG_MTL_FILL,
} mg_mtl_cmd;
typedef struct mg_mtl_path_elt
{
int pathIndex;
mg_mtl_seg_kind kind;
vector_float2 p[4];
} mg_mtl_path_elt;
typedef struct mg_mtl_segment
{
int pathIndex;
mg_mtl_seg_config config; //TODO pack these
int windingIncrement;
vector_float4 box;
} mg_mtl_segment;
typedef struct mg_mtl_path
{
mg_mtl_cmd cmd;
vector_float4 color;
vector_float4 box;
} mg_mtl_path;
#endif //__MTL_RENDERER_H_