Turn off automatic batching in version 11?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Turn off automatic batching in version 11?
Is there any way to turn off the automatic spritebatching? Something's causing a weird display issue for me that wasn't there when I was on 10.2 (the tile that the player character's sprite is moving to flashes briefly with a black border around it), and I want to disable the batching to see if it's related.
Possession - Escape from the Nether Regions, my roguelike made in LÖVE for the 2013 7-Day Roguelike Challenge
And its sequel, simply called Possession , which is available on itch.io or Steam, and whose engine I've open-sourced!
And its sequel, simply called Possession , which is available on itch.io or Steam, and whose engine I've open-sourced!
Re: Turn off automatic batching in version 11?
It's most definitely not related. Batching simply moves multiple quads for rendering at a time, as opposed to doing it one by one. You can use flushBatch function to force it to render whatever's in the batch and clear it.
Re: Turn off automatic batching in version 11?
Yeah, I know what batching is, I was using it manually before 11 came out.
If something's wrong, it's my code interacting with the batching in some weird way, but I'd like to be able to turn the auto-batching off so I know whether I need to even look in that direction. I agree it's probably a dead end, but I didn't have this problem in 10.2 and I do now in 11, and I don't see what else changed that could be causing it, so it'd be nice to be able to check.
If something's wrong, it's my code interacting with the batching in some weird way, but I'd like to be able to turn the auto-batching off so I know whether I need to even look in that direction. I agree it's probably a dead end, but I didn't have this problem in 10.2 and I do now in 11, and I don't see what else changed that could be causing it, so it'd be nice to be able to check.
Possession - Escape from the Nether Regions, my roguelike made in LÖVE for the 2013 7-Day Roguelike Challenge
And its sequel, simply called Possession , which is available on itch.io or Steam, and whose engine I've open-sourced!
And its sequel, simply called Possession , which is available on itch.io or Steam, and whose engine I've open-sourced!
- slime
- Solid Snayke
- Posts: 3132
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Turn off automatic batching in version 11?
The internals of love.graphics have been substantially rewritten since 0.10. It takes advantage of more OpenGL 3+ features when available than before, which runs more risk of encountering bugs inside graphics drivers.
You can't turn off batching because there's no other codepath. You can test using OpenGL 2 features instead of OpenGL 3 (set the environment variable LOVE_GRAPHICS_USE_GL2=1 in a command prompt before running love from that command prompt), which will force love to use a different / often slower method of sending automatically batched vertices to the GPU, if your system was previously using OpenGL 3 features.
SpriteBatches use a different rendering path than love.graphics.draw(image) as well. If the issue only happens when a spritebatch is used but not when love.graphics.draw(image) is used (or vice versa) it can help narrow down where the problem is happening.
In any case I'd recommend making sure your graphics drivers are as up to date as possible.
Re: Turn off automatic batching in version 11?
Cool, thanks for the information. One more question, is there any way to tell if something's being automatically batched vs straight up drawn? I've got some stuff I'm manually batching, and some other stuff that's probably a candidate for batching, but since it's not necessarily being drawn consecutively I'm not sure what's being batched and what's not (although when I check the number of draw calls it's pretty high so that makes me think it's not).slime wrote: ↑Thu Apr 19, 2018 1:27 amThe internals of love.graphics have been substantially rewritten since 0.10. It takes advantage of more OpenGL 3+ features when available than before, which runs more risk of encountering bugs inside graphics drivers.
You can't turn off batching because there's no other codepath. You can test using OpenGL 2 features instead of OpenGL 3 (set the environment variable LOVE_GRAPHICS_USE_GL2=1 in a command prompt before running love from that command prompt), which will force love to use a different / often slower method of sending automatically batched vertices to the GPU, if your system was previously using OpenGL 3 features.
SpriteBatches use a different rendering path than love.graphics.draw(image) as well. If the issue only happens when a spritebatch is used but not when love.graphics.draw(image) is used (or vice versa) it can help narrow down where the problem is happening.
In any case I'd recommend making sure your graphics drivers are as up to date as possible.
Possession - Escape from the Nether Regions, my roguelike made in LÖVE for the 2013 7-Day Roguelike Challenge
And its sequel, simply called Possession , which is available on itch.io or Steam, and whose engine I've open-sourced!
And its sequel, simply called Possession , which is available on itch.io or Steam, and whose engine I've open-sourced!
Who is online
Users browsing this forum: Bing [Bot], keharriso, Semrush [Bot] and 214 guests