optimising includes
[cilux] / src / drivers / mid / mid.c
index c4458bc..e18f352 100644 (file)
@@ -7,11 +7,6 @@
 
 /* -------------------------------------------------------------------------- */
 
-#include <math.h>
-
-#include <EGL/egl.h>
-#include <GLES2/gl2.h>
-
 #define WINDOW_WIDTH  640
 #define WINDOW_HEIGHT 480
 
@@ -80,6 +75,12 @@ EXPORT int mid_module_event(void* data)
     return 1;
 }
 
+EXPORT int mid_module_tick(void)
+{
+    if(!drawStuff(WINDOW_WIDTH, WINDOW_HEIGHT)) destroyEGL();
+    return 1;
+}
+
 /* -------------------------------------------------------------------------- */
 
 int handles_resource(char* name)
@@ -466,7 +467,7 @@ int drawStuff(int width, int height)
 
     eglSwapBuffers(eglDisplay, eglSurface);
 
-    angle += .001f;
+    angle += .007f;
 
     return !isEGLError("drawStuff");
 }
@@ -481,7 +482,7 @@ void deleteStuff(){
  
 /* ------------------------------------------------------------- */
 
-#include "X11/Xutil.h"
+#include <X11/Xutil.h>
 
 Window        x11Window   = 0;
 Display*      x11Display  = 0;