Working toward render timing
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
#define LIME_APP_APPLICATION_H
|
||||
|
||||
|
||||
#include <hx/CFFI.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
@@ -10,6 +13,10 @@ namespace lime {
|
||||
|
||||
public:
|
||||
|
||||
static double GetTicks ();
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
|
||||
virtual int Exec () = 0;
|
||||
|
||||
|
||||
|
||||
37
project/include/app/RenderEvent.h
Normal file
37
project/include/app/RenderEvent.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#ifndef LIME_APP_RENDER_EVENT_H
|
||||
#define LIME_APP_RENDER_EVENT_H
|
||||
|
||||
|
||||
#include <hx/CFFI.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
enum RenderEventType {
|
||||
|
||||
RENDER
|
||||
|
||||
};
|
||||
|
||||
|
||||
class RenderEvent {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
|
||||
RenderEvent ();
|
||||
|
||||
static void Dispatch (RenderEvent* event);
|
||||
|
||||
RenderEventType type;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -13,6 +13,8 @@ namespace lime {
|
||||
|
||||
public:
|
||||
|
||||
virtual void Flip () = 0;
|
||||
|
||||
Window* currentWindow;
|
||||
|
||||
|
||||
|
||||
38
project/include/app/UpdateEvent.h
Normal file
38
project/include/app/UpdateEvent.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef LIME_APP_UPDATE_EVENT_H
|
||||
#define LIME_APP_UPDATE_EVENT_H
|
||||
|
||||
|
||||
#include <hx/CFFI.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
enum UpdateEventType {
|
||||
|
||||
UPDATE
|
||||
|
||||
};
|
||||
|
||||
|
||||
class UpdateEvent {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
|
||||
UpdateEvent ();
|
||||
|
||||
static void Dispatch (UpdateEvent* event);
|
||||
|
||||
int deltaTime;
|
||||
UpdateEventType type;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user