Seperate out GL classes

This commit is contained in:
Joshua Granick
2014-06-10 07:55:30 -07:00
parent 8fd0f13bc1
commit 090c3cba28
13 changed files with 207 additions and 157 deletions

View File

@@ -0,0 +1,43 @@
#include <hx/CFFI.h>
#include <graphics/RenderEvent.h>
namespace lime {
AutoGCRoot* RenderEvent::callback = 0;
AutoGCRoot* RenderEvent::eventObject = 0;
//static int id_type;
//static bool init = false;
RenderEvent::RenderEvent () {
type = RENDER;
}
void RenderEvent::Dispatch (RenderEvent* event) {
if (RenderEvent::callback) {
//if (!init) {
//id_type = val_id ("type");
//}
value object = (RenderEvent::eventObject ? RenderEvent::eventObject->get () : alloc_empty_object ());
//alloc_field (object, id_type, alloc_int (event->type));
val_call1 (RenderEvent::callback->get (), object);
}
}
}