vxKernel/include/vhex/display/shader.h

27 lines
644 B
C

#ifndef __VHEX_DISPLAY_SHADER__
# define __VHEX_DISPLAY_SHADER__
#include <vhex/display/types.h>
/* dshader - display shader definition */
struct dshader_call {
int (*routine)(
dsurface_t *surface,
uint32_t *draw_args,
uint32_t *shader_args
);
uint32_t args[8];
};
typedef struct dshader_call dshader_call_t;
/* DSHADER_LIST - helper to create a list of shader "on-the-fly" */
#define DSHADER_LIST(shader_list) (dshader_call_t*)&{ shader_list }
/* DSHADER - helper to create a shader object */
#define DSHADER(fct, ...) (dshader_call_t){ \
.routine = fct, \
.args = { __VA_ARGS__ } \
}
#endif /* __VHEX_DISPLAY_SHADER__ */