#include "F_Draw.h"
#include "../FrameRender/FrameRender.h"
#include <stdlib.h>
#include <string.h>

void Draw_callback(Draw* self, struct FrameContext* fc) {
	RenderFrame(fc->frameBuffer, self->callbacks, self->sizeCallbacks);
}

FrameCallback* Draw_setup(Draw obj) {
	FrameCallback* fca = malloc(sizeof(struct FrameCallback));

	fca->callback = (FrameCallback_callback)Draw_callback;
	fca->callback_self = malloc(sizeof(obj));
	memcpy(fca->callback_self, &obj, sizeof(obj));

	return fca;
}
