nuklear
nuklear copied to clipboard
why experiment not working?
I put before main loop a clear background and delay. I get black window, no color why? How draw on background?
ctx = nk_sdl_init(win);
bg.r = 0.94f, bg.g = 0.83f, bg.b = 0.52f, bg.a = 1.0f;
.........
/* my copy code */
SDL_GetWindowSize(win, &win_width, &win_height);
glViewport(0, 0, win_width, win_height);
glClear(GL_COLOR_BUFFER_BIT);
glClearColor(bg.r, bg.g, bg.b, bg.a);
SDL_GL_SwapWindow(win);
SDL_Delay(1400);
/* end my code */
while (running)
{
/* Input */
Why i cant change colorbefore main loop? In loop exist any magic functions?