<p>Nuklear is an immediate mode graphical user interface toolkit written in ANSI C, it is platform agnostic and custom backends can be implemented to execute drawing commands and handle input on any platform.</p>
<p>I wrote backends for desktop GLFW OpenGL 2.1 and 3.2, as well as an Android backend for EGL OpenGL ES 2 and ES 3 in Go programming language. So now it's rather easy to create sophisticated GUI apps for Android in Go. Please see examples.</p>
<p><a href="https://github.com/golang-ui/nuklear">Github repo</a></p>
<p><a href="https://www.youtube.com/watch?v=3-MiceegZlM">Video demo</a></p>
<hr/>**评论:**<br/><br/>pkieltyka: <pre><p>this is amazing! I wish Google would sponsor some work like this</p></pre>computesomething: <pre><p>Well, there is 'Shiny' being in development by Google guys Nigel Tao and David Crawshaw: <a href="https://github.com/golang/exp/tree/master/shiny">https://github.com/golang/exp/tree/master/shiny</a></p>
<p>Unlike Nuklear, it's a Go native gui, it's sadly also far from finished.</p></pre>hippmr: <pre><p>Shiny appears to getting few updates, I'm afraid it's not a contender.</p></pre>computesomething: <pre><p>It is developing rather slowly, likely due to both main developers having other prioritized tasks, David Crawshaw has been doing the plugin support for Go 1.8</p></pre>throwlikepollock: <pre><p>This looks cool! What is the main use case for this? Games?</p></pre>xlab_is: <pre><p>Yep, the main use I think is when you want to do some tool for yourself or for low-demanding business. The Nuklear itself is in the public domain, all stack is MIT and is very, very portable. So there isn't a situation with Qt and its licenses against static linking and commercial use.</p>
<p>Games and game-like applications, some info terminals on cheap 10" Android tablets, this approach is just a quick and easy way to do some UI with layout and have it on multiple platforms out of the box.</p></pre>not_a_novel_account: <pre><p>Personally I use nuklear when I need a quick-and-dirty UI and I don't want my eyes to bleed</p></pre>hippmr: <pre><p>Is there somewhere a list of widgets & controls supported by nuklear?</p>
<p>Did I read it correctly that they have no table/grid widget?</p></pre>xlab_is: <pre><p>For examples it's better to check out the original repo
<a href="https://github.com/vurtun/nuklear" rel="nofollow">https://github.com/vurtun/nuklear</a></p>
<p>There is <code>overview.c</code> file that explains much, e.g. how to do a sample grid
<a href="https://github.com/vurtun/nuklear/blob/master/demo/overview.c#L216" rel="nofollow">https://github.com/vurtun/nuklear/blob/master/demo/overview.c#L216</a></p>
<p><code>nk_layout_row_static(ctx, 50, 50, 4);</code> would make a grid of 4 columns</p></pre>weberc2: <pre><p>This is neat. How does font rendering work? Does Nuklear handle that? I'm of the impression that this is complex, so I'm surprised that it could fit with the rest of this library in under 15kloc.</p></pre>xlab_is: <pre><blockquote>
<p>How does font rendering work? Does Nuklear handle that?</p>
</blockquote>
<p>Yes, it has a font baker that prepares font atlas an renders it into a texture. This is the easiest way especially with vertex output, but there are other ways to do fonts, you can implement your own font renderer and plug it in.</p></pre>rosencreuz: <pre><p>Does it work for windows and darwin? When I try to build for Windows I'm getting an error: </p>
<pre><code>> GOOS=windows GOARCH=amd64 go build
ui/splash.go:8:2: no buildable Go source files in ...vendor/github.com/go-gl/gl/v3.2-core/gl
ui/splash.go:9:2: no buildable Go source files in ...vendor/github.com/go-gl/glfw/v3.2/glfw
</code></pre></pre>xlab_is: <pre><p>Seems that your setup is a bit screwed, my repos for nuklear don't have <code>vendor</code></p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传