mirror of https://github.com/vurtun/nuklear.git
removed platform depended compiler flag
parent
d2549a2f23
commit
9524dfebea
2
Makefile
2
Makefile
|
@ -31,5 +31,5 @@ clang: $(BIN)
|
|||
$(BIN):
|
||||
@mkdir -p bin
|
||||
rm -f bin/$(BIN) $(OBJS)
|
||||
$(CC) $(SRC) -D_POSIX_C_SOURCE=200809L $(CFLAGS) -o bin/$(BIN) -lSDL2 -lGL -lGLU
|
||||
$(CC) $(SRC) $(CFLAGS) -o bin/$(BIN) -lSDL2 -lGL -lGLU
|
||||
|
||||
|
|
16
opengl.c
16
opengl.c
|
@ -15,14 +15,12 @@
|
|||
#include "gui.h"
|
||||
|
||||
/* macros */
|
||||
#define WIN_WIDTH 800
|
||||
#define WIN_HEIGHT 600
|
||||
#define DTIME 33
|
||||
#define MAX_BUFFER (256 * 1024)
|
||||
#define UNUSED(v) (void)v
|
||||
#define WIN_WIDTH 600
|
||||
#define WIN_HEIGHT 400
|
||||
#define MAX_BUFFER (64 * 1024)
|
||||
#define MAX_PANELS 4
|
||||
|
||||
#define LEN(a)(sizeof(a)/sizeof(a)[0])
|
||||
#define UNUSED(a)((void)(a))
|
||||
#define DTIME 33
|
||||
|
||||
/* functions */
|
||||
static void die(const char*,...);
|
||||
|
@ -382,7 +380,7 @@ main(int argc, char *argv[])
|
|||
panel = gui_panel_new(ctx, 20, 20, 200, 200, &config, font);
|
||||
subpanel = gui_panel_new(ctx, 250, 20, 200, 200, &config, font);
|
||||
|
||||
running = 1;
|
||||
running = gui_true;
|
||||
while (running) {
|
||||
SDL_Event ev;
|
||||
started = SDL_GetTicks();
|
||||
|
@ -396,9 +394,9 @@ main(int argc, char *argv[])
|
|||
else if (ev.type == SDL_KEYUP) krelease(&input, &ev);
|
||||
}
|
||||
gui_input_end(&input);
|
||||
SDL_GetWindowSize(win, &width, &height);
|
||||
|
||||
/* ------------------------- GUI --------------------------*/
|
||||
SDL_GetWindowSize(win, &width, &height);
|
||||
gui_begin(ctx, (gui_float)width, (gui_float)height);
|
||||
running = gui_begin_panel(ctx, panel, "Demo",
|
||||
GUI_PANEL_HEADER|GUI_PANEL_CLOSEABLE|GUI_PANEL_MINIMIZABLE|
|
||||
|
|
Loading…
Reference in New Issue