GithubHelp home page GithubHelp logo

Comments (10)

dumblob avatar dumblob commented on June 11, 2024

Sure, that's one of the main goals of Nuklear - to have extremely easily pluggable backends. Just look at the demo/ folder where you'll find all currently functional backends (there might be some also in pull requests to this repository). If you need more help, don't hesitate and ask 😉.

from nuklear.

RossComputerGuy avatar RossComputerGuy commented on June 11, 2024

Ok, it looks pretty straight forward. I'll leave the issue open if I need help.

from nuklear.

RossComputerGuy avatar RossComputerGuy commented on June 11, 2024
opticsgs/libopnuk on  master [!?] took 38m 28s
[I] ➜ ../build/demos/opnuk/demo-opnuk
** Message: 10:27:38.505: Using /run/user/1000/slatewm.sock for IPC path
demo-opnuk: /home/ross/RonixOS/opticsgs/libopnuk/nuklear/nuklear.h:16325: nk_begin_titled: Assertion `win->seq != ctx->seq' failed.

Got this error creating just doing this:

    if (nk_begin(&ctx.nkctx, "Overview", nk_rect(10, 10, 400, 600), NK_WINDOW_BORDER)) {
    }
    nk_end(&ctx.nkctx);

from nuklear.

RossComputerGuy avatar RossComputerGuy commented on June 11, 2024

I took the rawfb header from the X11 RawFB example and integrated it, I only see a white box.

from nuklear.

dumblob avatar dumblob commented on June 11, 2024

Got this error creating just doing this:
...

This is weird. Please post the full source code somewhere (pastebin, your github repo, ...) so that we can take a look.

I took the rawfb header from the X11 RawFB example and integrated it, I only see a white box.

Same as above - post the full source and I'll try to find some time to dig through it during the next two or three weeks.

from nuklear.

RossComputerGuy avatar RossComputerGuy commented on June 11, 2024

https://github.com/ronixos/opticsgs is the repository I'm doing this all in, libopnuk is doing the Nuklear rendering stuff and demos/opnuk/src/main.c is where libopnuk is being used.

from nuklear.

RossComputerGuy avatar RossComputerGuy commented on June 11, 2024

The code of the opnuk demo I'm working on.

  libopticsgs_win_t* win;
  if ((r = libopticsgs_window_create(&win, 0, 0, 0, 640, 480, 0)) != LIBOPTICSGS_ERROR_NONE) {
    g_error("Failed to create window: %s", libopticsgs_strerror(r));
    return EXIT_FAILURE;
  }
  opnuk_context_t ctx;
  if ((r = opnuk_init(win, OPNUK_RENDER_GL2, &ctx)) < OPNUK_ERROR_NONE) {
    libopticsgs_window_destroy(win);
    g_error("Failed to initialize opnuk: %d", r);
    return EXIT_FAILURE;
  }
  while (1) {
    struct nk_context* nk = opnuk_getnk(&ctx);
    if (nk_begin(nk, "Overview", nk_rect(0, 0, win->width, win->height), NK_WINDOW_BORDER|NK_WINDOW_MOVABLE|NK_WINDOW_CLOSABLE|NK_WINDOW_MINIMIZABLE|NK_WINDOW_TITLE)) {
      nk_layout_row_dynamic(nk, 20, 1);
      if (nk_button_label(nk, "button")) {}
    }
    nk_end(nk);
    if (ctx.renderer == OPNUK_RENDER_GL2) {
      glViewport(0, 0, win->width, win->height);
      glClear(GL_COLOR_BUFFER_BIT);
      glClearColor(0.10f, 0.18f, 0.24f, 1.0f);
    }
    opnuk_render(ctx);
  }

The green border is the window frame in the screenshots bellow.

Rendering with rawfb:
image
In this, it is rendering outside of the space its supposed to in the bottom and right.

Rendering with OpenGL 2.0:
image
In this, nothing is rendering

from nuklear.

hbiblia avatar hbiblia commented on June 11, 2024

https://github.com/ronixos/opticsgs error 404??

from nuklear.

RossComputerGuy avatar RossComputerGuy commented on June 11, 2024

I stopped developing that since it wouldnt work

from nuklear.

hbiblia avatar hbiblia commented on June 11, 2024

I stopped developing that since it wouldnt work

oka, nad closes this thread if it is no longer necessary.

from nuklear.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.