GithubHelp home page GithubHelp logo

nuklear.jl's Introduction

Nuklear

Build Status Build Status

Julia wrapper for nuklear, a minimal state immediate mode graphical user interface toolkit written in ANSI C. The bindings are auto-generated using Clang.jl. Please refer to nuklear docs for how to use those C-bindings.

Installation

pkg> add Nuklear

Example

Some basic examples can be found in the demo folder.

demo

Backends

  • GLFW.jl + ModernGL.jl
  • SFML(pending upstream)
  • SDL(pending upstream)

License

Only the Julia code in this repo is released under MIT license. Other assets such as those fonts in the demo/extra_font folder are released under their own license.

nuklear.jl's People

Contributors

gnimuc avatar juliatagbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nuklear.jl's Issues

Error: GLFW ERROR: code FORMAT_UNAVAILABLE msg: NSGL: Failed to find a suitable pixel format

$ julia10 demo/overview.jl
┌ Error: GLFW ERROR: code FORMAT_UNAVAILABLE msg: NSGL: Failed to find a suitable pixel format
└ @ Main ~/.julia/dev/Nuklear/demo/overview.jl:27

signal (11): Segmentation fault: 11
in expression starting at /Users/scls/.julia/dev/Nuklear/demo/overview.jl:31
glfwSetWindowUserPointer at /Users/scls/.julia/packages/Homebrew/l8kUw/deps/usr/lib/libglfw.dylib (unknown line)
CreateWindow at /Users/scls/.julia/packages/GLFW/69NQ7/src/glfw3.jl:490
CreateWindow at /Users/scls/.julia/packages/GLFW/69NQ7/src/glfw3.jl:487 [inlined]
CreateWindow at /Users/scls/.julia/packages/GLFW/69NQ7/src/glfw3.jl:487
unknown function (ip: 0x11b016921)
jl_fptr_trampoline at /Users/osx/buildbot/slave/package_osx64/build/src/gf.c:1831
do_call at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:324
eval_stmt_value at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:363 [inlined]
eval_body at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:682
jl_interpret_toplevel_thunk_callback at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:806
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x1103dc14f)
unknown function (ip: 0x0)
jl_interpret_toplevel_thunk at /Users/osx/buildbot/slave/package_osx64/build/src/interpreter.c:815
jl_toplevel_eval_flex at /Users/osx/buildbot/slave/package_osx64/build/src/toplevel.c:805
jl_parse_eval_all at /Users/osx/buildbot/slave/package_osx64/build/src/ast.c:838
jl_load at /Users/osx/buildbot/slave/package_osx64/build/src/toplevel.c:839 [inlined]
jl_load_ at /Users/osx/buildbot/slave/package_osx64/build/src/toplevel.c:846
include at ./boot.jl:317 [inlined]
include_relative at ./loading.jl:1044
include at ./sysimg.jl:29
exec_options at ./client.jl:231
_start at ./client.jl:425
true_main at /Users/scls/bin/julia10 (unknown line)
main at /Users/scls/bin/julia10 (unknown line)
Allocations: 3723717 (Pool: 3722511; Big: 1206); GC: 7
Segmentation fault: 11

ERROR: LoadError: MethodError: no method matching error_callback(::GLFW.GLFWError)

Hello,

First, thanks @Gnimuc for this package, Julia is lacking UI lib and having this one can help.

After installing latest master version of Nuklear.jl

$ julia10
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.2 (2018-11-08)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using Pkg

julia> Pkg.clone("https://github.com/Gnimuc/Nuklear.jl")

julia> Pkg.add("ModernGL")

julia> Pkg.add("GLFW")

CTRL + D

$ cd ~/.julia/dev/Nuklear/

I'm facing an error

$ julia10 demo/demo.jl
ERROR: LoadError: MethodError: no method matching error_callback(::GLFW.GLFWError)
Closest candidates are:
  error_callback(!Matched::Int32, !Matched::Ptr{UInt8}) at /Users/scls/.julia/dev/Nuklear/demo/demo.jl:27
Stacktrace:
 [1] _ErrorCallbackWrapper(::Int32, ::Cstring) at /Users/scls/.julia/packages/GLFW/69NQ7/src/callback.jl:43
 [2] CreateWindow(::Int64, ::Int64, ::String, ::GLFW.Monitor, ::GLFW.Window) at /Users/scls/.julia/packages/GLFW/69NQ7/src/glfw3.jl:487 (repeats 3 times)
 [3] top-level scope at none:0
 [4] include at ./boot.jl:317 [inlined]
 [5] include_relative(::Module, ::String) at ./loading.jl:1044
 [6] include(::Module, ::String) at ./sysimg.jl:29
 [7] exec_options(::Base.JLOptions) at ./client.jl:231
 [8] _start() at ./client.jl:425
in expression starting at /Users/scls/.julia/dev/Nuklear/demo/demo.jl:31

I'm using Mac OS X 10.13.6

Any idea?

Kind regards

Fonts + high DPI

Fonts look pretty bad and elements are very small on a high dpi display.
Those issues are likely related!

Fonts seem like they can look nice:
vurtun/nuklear#69

I guess I can also answer my second question:
vurtun/nuklear#283
:D
It's pretty easy to figure out the dpi of a screen with GLFW, so maybe we can do that and scale the demo accordingly

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.