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() {
var err error
glContext, err = Init()
glContext, err = initialize()
if err != nil {
panic(err)
}

View File

@ -47,7 +47,7 @@ func CurrentUI() *UserInterface {
return currentUI
}
func Init() (*opengl.Context, error) {
func initialize() (*opengl.Context, error) {
runtime.LockOSThread()
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.
if js.Global.Get("require") != js.Undefined {
c, err := opengl.NewContext()