mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
shareable: Use as big backends as possible
As the shader hack is removed at d74f7d3a77
,
any sizes of textures should work regardless of the float precision.
This commit is contained in:
parent
aea4630b5f
commit
383ff1e6a7
@ -45,8 +45,8 @@ var (
|
||||
maxSize = 0
|
||||
)
|
||||
|
||||
func min(a, b int) int {
|
||||
if a < b {
|
||||
func max(a, b int) int {
|
||||
if a > b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
@ -662,17 +662,8 @@ func BeginFrame() error {
|
||||
if len(theBackends) != 0 {
|
||||
panic("shareable: all the images must be not-shared before the game starts")
|
||||
}
|
||||
if graphicsDriver.HasHighPrecisionFloat() {
|
||||
minSize = 1024
|
||||
// Use 4096 as a maximum size whatever size the graphics driver accepts. There are
|
||||
// not enough evidences that bigger textures works correctly.
|
||||
//
|
||||
// TODO: Now we can remove this limitation?
|
||||
maxSize = min(4096, graphicsDriver.MaxImageSize())
|
||||
} else {
|
||||
minSize = 512
|
||||
maxSize = 512
|
||||
}
|
||||
minSize = 1024
|
||||
maxSize = max(minSize, graphicsDriver.MaxImageSize())
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user