nuklear
nuklear copied to clipboard
background example
Hi, i started trying to use nuklear and i found a peculiar problem in the d3d9 demo example i cant remove the color background, looks like it is on the directx and solutions using ctx->window.background example doesnt work, can someone help with this?
ctx->style.*
@dumblob @irtusb @SekkaiDev @vurtun @m0ppers how draw a line on background ?
for example oficial demo
/* Draw */
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_SetRenderDrawColor( renderer, 170, 80, 89 , 1);
SDL_RenderDrawLine( renderer, 0, 0, 400, 400);
/* IMPORTANT: `nk_sdl_render` modifies some global OpenGL state
* with blending, scissor, face culling, depth test and viewport and
* defaults everything back into a default state.
* Make sure to either a.) save and restore or b.) reset your own state after
* rendering the UI. */
nk_sdl_render(NK_ANTI_ALIASING_ON, MAX_VERTEX_MEMORY, MAX_ELEMENT_MEMORY);
SDL_GL_SwapWindow(win);
How draw without renderer? Nobody write example with SDL2 only
@ccawley2011 Meybe You can help me to using graphics function on background in sdl2 and opengl? Meybe a line, change color line etc?
What would you use Nuklear for if without renderer?
@dumblob Nuclear setup what i show on background
You can't show anything if it won't get rendered first. It's like printing on a printer without ink/powder.
@dumblob I can change color background first than I write nuclear gui. Here is proof glClearColor(bg.r, bg.g, bg.b, bg.a); (look at code)