mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
ui: Hide Init() func
This commit is contained in:
parent
a35064db7d
commit
cd5436712b
@ -26,7 +26,7 @@ func GLContext() *opengl.Context {
|
||||
|
||||
func init() {
|
||||
var err error
|
||||
glContext, err = Init()
|
||||
glContext, err = initialize()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user