Browse Source

Update Nuklear to 1.18

Fixes #907.
Camilla Löwy 8 years ago
parent
commit
f44307da4e
4 changed files with 496 additions and 311 deletions
  1. 490 303
      deps/nuklear.h
  2. 3 3
      deps/nuklear_glfw_gl2.h
  3. 1 2
      tests/gamma.c
  4. 2 3
      tests/joysticks.c

File diff suppressed because it is too large
+ 490 - 303
deps/nuklear.h


+ 3 - 3
deps/nuklear_glfw_gl2.h

@@ -1,5 +1,5 @@
 /*
- * Nuklear - v1.00 - public domain
+ * Nuklear - v1.17 - public domain
  * no warrenty implied; use at your own risk.
  * authored from 2015-2016 by Micha Mettke
  */
@@ -219,7 +219,7 @@ nk_glfw3_clipbard_copy(nk_handle usr, const char *text, int len)
     if (!len) return;
     str = (char*)malloc((size_t)len+1);
     if (!str) return;
-    NK_MEMCPY(str, text, (size_t)len);
+    memcpy(str, text, (size_t)len);
     str[len] = '\0';
     glfwSetClipboardString(glfw.win, str);
     free(str);
@@ -344,7 +344,7 @@ void nk_glfw3_shutdown(void)
     nk_free(&glfw.ctx);
     glDeleteTextures(1, &dev->font_tex);
     nk_buffer_free(&dev->cmds);
-    NK_MEMSET(&glfw, 0, sizeof(glfw));
+    memset(&glfw, 0, sizeof(glfw));
 }
 
 #endif

+ 1 - 2
tests/gamma.c

@@ -116,7 +116,6 @@ int main(int argc, char** argv)
     while (!glfwWindowShouldClose(window))
     {
         int width, height;
-        struct nk_panel layout;
         struct nk_rect area;
 
         glfwGetWindowSize(window, &width, &height);
@@ -124,7 +123,7 @@ int main(int argc, char** argv)
 
         glClear(GL_COLOR_BUFFER_BIT);
         nk_glfw3_new_frame();
-        if (nk_begin(nk, &layout, "", area, 0))
+        if (nk_begin(nk, "", area, 0))
         {
             const GLFWgammaramp* ramp = glfwGetGammaRamp(monitor);
             nk_window_set_bounds(nk, area);

+ 2 - 3
tests/joysticks.c

@@ -128,14 +128,13 @@ int main(void)
     while (!glfwWindowShouldClose(window))
     {
         int i, width, height;
-        struct nk_panel layout;
 
         glfwGetWindowSize(window, &width, &height);
 
         glClear(GL_COLOR_BUFFER_BIT);
         nk_glfw3_new_frame();
 
-        if (nk_begin(nk, &layout,
+        if (nk_begin(nk,
                      "Joysticks",
                      nk_rect(0.f, 0.f, 0.f, 0.f),
                      NK_WINDOW_MINIMIZABLE |
@@ -162,7 +161,7 @@ int main(void)
 
         for (i = 0;  i < joystick_count;  i++)
         {
-            if (nk_begin(nk, &layout,
+            if (nk_begin(nk,
                          joystick_label(joysticks[i]),
                          nk_rect(i * 20.f, i * 20.f, 400.f, 400.f),
                          NK_WINDOW_BORDER |

Some files were not shown because too many files changed in this diff