mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-13 20:42:07 +01:00
internal/atlas: Allow extending a texture atlas
As PBO is no longer used (#1678), using a big atlas with ReplacePixels is no longer problematic. Closes #1674 Updates #1675
This commit is contained in:
parent
7c36426933
commit
414a64ce78
@ -715,10 +715,7 @@ func BeginFrame() error {
|
|||||||
if len(theBackends) != 0 {
|
if len(theBackends) != 0 {
|
||||||
panic("atlas: all the images must be not on an atlas before the game starts")
|
panic("atlas: all the images must be not on an atlas before the game starts")
|
||||||
}
|
}
|
||||||
// Use 8192 as a minimum texture size to reduce chences to extend the texture (#1675).
|
minSize = 1024
|
||||||
// For example, extending a texture size from 4096px to 8192px might be slow in some environments.
|
|
||||||
// TODO: Extending a texture to 16384px can be very slow (#1674).
|
|
||||||
minSize = min(8192, restorable.MaxImageSize())
|
|
||||||
maxSize = restorable.MaxImageSize()
|
maxSize = restorable.MaxImageSize()
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user