nuklear icon indicating copy to clipboard operation
nuklear copied to clipboard

background example

Open Luquini opened this issue 6 years ago • 7 comments

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?

Luquini avatar Feb 21 '19 23:02 Luquini

ctx->style.*

irtusb avatar Feb 24 '19 20:02 irtusb

@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

letarg0 avatar Feb 26 '19 16:02 letarg0

@ccawley2011 Meybe You can help me to using graphics function on background in sdl2 and opengl? Meybe a line, change color line etc?

letarg0 avatar Mar 07 '19 21:03 letarg0

What would you use Nuklear for if without renderer?

dumblob avatar Mar 12 '19 17:03 dumblob

@dumblob Nuclear setup what i show on background

letarg0 avatar Mar 13 '19 08:03 letarg0

You can't show anything if it won't get rendered first. It's like printing on a printer without ink/powder.

dumblob avatar Mar 13 '19 19:03 dumblob

@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)

letarg0 avatar Mar 24 '19 11:03 letarg0