mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
ui: Add glcontext.go
This commit is contained in:
parent
b146e5d1b4
commit
c5e42c91be
25
internal/ui/glcontext.go
Normal file
25
internal/ui/glcontext.go
Normal file
@ -0,0 +1,25 @@
|
||||
// Copyright 2016 The Ebiten Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package ui
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/ebiten/internal/graphics/opengl"
|
||||
)
|
||||
|
||||
var glContext *opengl.Context
|
||||
|
||||
func GLContext() *opengl.Context {
|
||||
return glContext
|
||||
}
|
@ -43,12 +43,6 @@ func CurrentUI() UserInterface {
|
||||
return currentUI
|
||||
}
|
||||
|
||||
var glContext *opengl.Context
|
||||
|
||||
func GLContext() *opengl.Context {
|
||||
return glContext
|
||||
}
|
||||
|
||||
func init() {
|
||||
if err := initialize(); err != nil {
|
||||
panic(err)
|
||||
|
@ -136,12 +136,6 @@ func touchEventToTouches(e *js.Object) []touch {
|
||||
return t
|
||||
}
|
||||
|
||||
var glContext *opengl.Context
|
||||
|
||||
func GLContext() *opengl.Context {
|
||||
return glContext
|
||||
}
|
||||
|
||||
func init() {
|
||||
if err := initialize(); err != nil {
|
||||
panic(err)
|
||||
|
@ -24,12 +24,6 @@ import (
|
||||
"github.com/hajimehoshi/ebiten/internal/graphics/opengl"
|
||||
)
|
||||
|
||||
var glContext *opengl.Context
|
||||
|
||||
func GLContext() *opengl.Context {
|
||||
return glContext
|
||||
}
|
||||
|
||||
func Main() error {
|
||||
return errors.New("ui: don't call this: use RunWithoutMainLoop instead of Run")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user