mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +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) {
|
func (v *view) forceSetDisplaySyncEnabled(enabled bool) {
|
||||||
v.ml.SetDisplaySyncEnabled(enabled)
|
v.ml.SetDisplaySyncEnabled(enabled)
|
||||||
v.vsyncDisabled = !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 {
|
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).
|
// nextDrawable took more than one second if the window has other controls like NSTextView (#1029).
|
||||||
v.ml.SetPresentsWithTransaction(false)
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user