Browse Source

Fixed build for optional examples

vurtun 9 years ago
parent
commit
eb7b0847b6
5 changed files with 25 additions and 0 deletions
  1. 7 0
      demo/allegro5/main.c
  2. 2 0
      demo/glfw_opengl2/main.c
  3. 2 0
      demo/glfw_opengl3/main.c
  4. 7 0
      demo/sdl_opengl2/main.c
  5. 7 0
      demo/sdl_opengl3/main.c

+ 7 - 0
demo/allegro5/main.c

@@ -7,6 +7,8 @@
 #include <math.h>
 #include <assert.h>
 #include <math.h>
+#include <limits.h>
+#include <time.h>
 
 #include <allegro5/allegro.h>
 #include <allegro5/allegro_primitives.h>
@@ -30,6 +32,11 @@
 #include "nuklear_allegro.h"
 #include "nuklear_allegro.c"
 
+#define UNUSED(a) (void)a
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+#define MAX(a,b) ((a) < (b) ? (b) : (a))
+#define LEN(a) (sizeof(a)/sizeof(a)[0])
+
 /* ===============================================================
  *
  *                          EXAMPLE

+ 2 - 0
demo/glfw_opengl2/main.c

@@ -7,6 +7,8 @@
 #include <math.h>
 #include <assert.h>
 #include <math.h>
+#include <limits.h>
+#include <time.h>
 
 #include <GLFW/glfw3.h>
 

+ 2 - 0
demo/glfw_opengl3/main.c

@@ -7,6 +7,8 @@
 #include <math.h>
 #include <assert.h>
 #include <math.h>
+#include <limits.h>
+#include <time.h>
 
 #include <GL/glew.h>
 #include <GLFW/glfw3.h>

+ 7 - 0
demo/sdl_opengl2/main.c

@@ -7,6 +7,8 @@
 #include <math.h>
 #include <assert.h>
 #include <math.h>
+#include <limits.h>
+#include <time.h>
 
 #include <SDL2/SDL.h>
 #include <SDL2/SDL_opengl.h>
@@ -29,6 +31,11 @@
 #define MAX_VERTEX_MEMORY 512 * 1024
 #define MAX_ELEMENT_MEMORY 128 * 1024
 
+#define UNUSED(a) (void)a
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+#define MAX(a,b) ((a) < (b) ? (b) : (a))
+#define LEN(a) (sizeof(a)/sizeof(a)[0])
+
 /* ===============================================================
  *
  *                          EXAMPLE

+ 7 - 0
demo/sdl_opengl3/main.c

@@ -7,6 +7,8 @@
 #include <math.h>
 #include <assert.h>
 #include <math.h>
+#include <limits.h>
+#include <time.h>
 
 #include <GL/glew.h>
 #include <SDL2/SDL.h>
@@ -30,6 +32,11 @@
 #define MAX_VERTEX_MEMORY 512 * 1024
 #define MAX_ELEMENT_MEMORY 128 * 1024
 
+#define UNUSED(a) (void)a
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+#define MAX(a,b) ((a) < (b) ? (b) : (a))
+#define LEN(a) (sizeof(a)/sizeof(a)[0])
+
 /* ===============================================================
  *
  *                          EXAMPLE