Nuklear GUI package for Go now supports various backends including Android

xuanbao · · 1044 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<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&#39;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 &#39;Shiny&#39; 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&#39;s a Go native gui, it&#39;s sadly also far from finished.</p></pre>hippmr: <pre><p>Shiny appears to getting few updates, I&#39;m afraid it&#39;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&#39;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&#34; 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&#39;t want my eyes to bleed</p></pre>hippmr: <pre><p>Is there somewhere a list of widgets &amp; 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&#39;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&#39;m of the impression that this is complex, so I&#39;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&#39;m getting an error: </p> <pre><code>&gt; 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&#39;t have <code>vendor</code></p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

1044 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传