mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
graphics: Refactoring
This commit is contained in:
parent
c07f16d9a4
commit
c291e2abad
@ -62,12 +62,6 @@ func (c *graphicsContext) setSize(screenWidth, screenHeight, screenScale int) er
|
||||
if c.screen != nil {
|
||||
c.screen.Dispose()
|
||||
}
|
||||
|
||||
f, err := graphics.NewZeroFramebuffer(glContext, screenWidth*screenScale, screenHeight*screenScale)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
texture, err := graphics.NewTexture(glContext, screenWidth, screenHeight, glContext.Nearest)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -83,6 +77,11 @@ func (c *graphicsContext) setSize(screenWidth, screenHeight, screenScale int) er
|
||||
width: w,
|
||||
height: h,
|
||||
}
|
||||
|
||||
f, err := graphics.NewZeroFramebuffer(glContext, screenWidth*screenScale, screenHeight*screenScale)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
w, h = f.Size()
|
||||
c.defaultRenderTarget = &Image{
|
||||
framebuffer: f,
|
||||
|
Loading…
Reference in New Issue
Block a user