ui: Hide Init() func

This commit is contained in:
Hajime Hoshi 2016-05-18 11:12:23 +09:00
parent a35064db7d
commit cd5436712b
3 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ func GLContext() *opengl.Context {
func init() { func init() {
var err error var err error
glContext, err = Init() glContext, err = initialize()
if err != nil { if err != nil {
panic(err) panic(err)
} }

View File

@ -47,7 +47,7 @@ func CurrentUI() *UserInterface {
return currentUI return currentUI
} }
func Init() (*opengl.Context, error) { func initialize() (*opengl.Context, error) {
runtime.LockOSThread() runtime.LockOSThread()
if err := glfw.Init(); err != nil { if err := glfw.Init(); err != nil {

View File

@ -99,7 +99,7 @@ func (u *UserInterface) SwapBuffers() {
} }
} }
func Init() (*opengl.Context, error) { func initialize() (*opengl.Context, error) {
// Do nothing in node.js. // Do nothing in node.js.
if js.Global.Get("require") != js.Undefined { if js.Global.Get("require") != js.Undefined {
c, err := opengl.NewContext() c, err := opengl.NewContext()