ebiten: internal/graphicsdriver/directx: crash when creating too many internal textures
I tried to update my project to use the newest 2.3.x version of Ebiten (coming from 2.2.x), however I am getting the following error which crashes out before it can fully load the window, when trying to run on Windows 10:
directx: ID3D12Device::CreateCommittedResource failed: The parameter is incorrect.
The weird thing is that the new version works against the older code in the main branch, but I’ve got a lot of new features I’ve been working in a feature branch off to the side where it is failing only with the newer versions (raycast_collision
).
Reproduce steps:
- Download the Zip from this commit SHA: https://github.com/harbdog/raycaster-go/tree/6e4aa60fd9328d1ff1c6e39c968829035c2ec6d2
- Download modules:
go mod download
- Run to verify works against previous version of Ebiten:
go run raycast.go
- Exit the game by holding CTRL key to unlock mouse from window to close it.
- Update Ebiten:
go get github.com/hajimehoshi/ebiten/v2@v2.3.2
- Run again to see error:
go run raycast.go
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 27 (27 by maintainers)
yes that’s the only error I got
I could (and should anyway) optimize the sprite used as a projectile, it’s only that big because that’s the exact size it was from the resource I obtained it from (opengameart.org). But it’s in a sheet because it’s an animated sprite with multiple frames.
When the animated sprite is loaded from a sheet I pre-generate each frame using subImage and store each in an index array for looping the animation. https://github.com/harbdog/raycaster-go/blob/raycast_collision/engine/model/sprite.go#L230