mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
opengl: Rename ResetGLState -> Reset and other functions
This commit is contained in:
parent
b8aa35373a
commit
bc3ca38f76
@ -75,7 +75,7 @@ func (c *graphicsContext) SetSize(screenWidth, screenHeight int, screenScale flo
|
|||||||
|
|
||||||
func (c *graphicsContext) initializeIfNeeded() error {
|
func (c *graphicsContext) initializeIfNeeded() error {
|
||||||
if !c.initialized {
|
if !c.initialized {
|
||||||
if err := shareable.InitializeGLState(); err != nil {
|
if err := shareable.InitializeGraphicsDriverState(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
c.initialized = true
|
c.initialized = true
|
||||||
|
@ -512,9 +512,7 @@ func (c *newScreenFramebufferImageCommand) CanMerge(dst, src *Image, color *affi
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// ResetGLState resets or initializes the current OpenGL state.
|
// ResetGraphicsDriverState resets or initializes the current graphics driver state.
|
||||||
//
|
func ResetGraphicsDriverState() error {
|
||||||
// TODO: Rename this
|
return opengl.Reset()
|
||||||
func ResetGLState() error {
|
|
||||||
return opengl.ResetGLState()
|
|
||||||
}
|
}
|
||||||
|
@ -147,8 +147,8 @@ const (
|
|||||||
maxQuads = maxTriangles / 2
|
maxQuads = maxTriangles / 2
|
||||||
)
|
)
|
||||||
|
|
||||||
// ResetGLState resets or initializes the current OpenGL state.
|
// Reset resets or initializes the current OpenGL state.
|
||||||
func ResetGLState() error {
|
func Reset() error {
|
||||||
return theOpenGLState.reset()
|
return theOpenGLState.reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ func ResolveStaleImages() {
|
|||||||
//
|
//
|
||||||
// Restoring means to make all *graphicscommand.Image objects have their textures and framebuffers.
|
// Restoring means to make all *graphicscommand.Image objects have their textures and framebuffers.
|
||||||
func Restore() error {
|
func Restore() error {
|
||||||
if err := graphicscommand.ResetGLState(); err != nil {
|
if err := graphicscommand.ResetGraphicsDriverState(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return theImages.restore()
|
return theImages.restore()
|
||||||
@ -206,9 +206,9 @@ func (i *images) restore() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// InitializeGLState initializes the GL state.
|
// InitializeGraphicsDriverState initializes the graphics driver state.
|
||||||
func InitializeGLState() error {
|
func InitializeGraphicsDriverState() error {
|
||||||
return graphicscommand.ResetGLState()
|
return graphicscommand.ResetGraphicsDriverState()
|
||||||
}
|
}
|
||||||
|
|
||||||
func Error() error {
|
func Error() error {
|
||||||
|
@ -449,10 +449,10 @@ func NewScreenFramebufferImage(width, height int) *Image {
|
|||||||
return i
|
return i
|
||||||
}
|
}
|
||||||
|
|
||||||
func InitializeGLState() error {
|
func InitializeGraphicsDriverState() error {
|
||||||
backendsM.Lock()
|
backendsM.Lock()
|
||||||
defer backendsM.Unlock()
|
defer backendsM.Unlock()
|
||||||
return restorable.InitializeGLState()
|
return restorable.InitializeGraphicsDriverState()
|
||||||
}
|
}
|
||||||
|
|
||||||
func ResolveStaleImages() {
|
func ResolveStaleImages() {
|
||||||
|
Loading…
Reference in New Issue
Block a user