mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
internal/graphicsdriver/metal: refactoring
This commit is contained in:
parent
fd63820139
commit
87fe7bfd99
@ -52,9 +52,6 @@ func (v *view) setDisplaySyncEnabled(enabled bool) {
|
||||
func (v *view) forceSetDisplaySyncEnabled(enabled bool) {
|
||||
v.ml.SetDisplaySyncEnabled(enabled)
|
||||
v.vsyncDisabled = !enabled
|
||||
|
||||
// Always use 3. There are some situations that the FPS becomes half, or the FPS becomes too low (#2880).
|
||||
v.ml.SetMaximumDrawableCount(3)
|
||||
}
|
||||
|
||||
func (v *view) colorPixelFormat() mtl.PixelFormat {
|
||||
@ -86,6 +83,9 @@ func (v *view) initialize(device mtl.Device) error {
|
||||
// nextDrawable took more than one second if the window has other controls like NSTextView (#1029).
|
||||
v.ml.SetPresentsWithTransaction(false)
|
||||
|
||||
// Always use 3. There are some situations that the FPS becomes half, or the FPS becomes too low (#2880).
|
||||
v.ml.SetMaximumDrawableCount(3)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user