Skip to content

Instantly share code, notes, and snippets.

@JujuAdams
Last active May 18, 2026 19:42
Show Gist options
  • Select an option

  • Save JujuAdams/4b0f8839335df48f520c63f5ef58dc8e to your computer and use it in GitHub Desktop.

Select an option

Save JujuAdams/4b0f8839335df48f520c63f5ef58dc8e to your computer and use it in GitHub Desktop.
A brief introduction to batch breaks in GameMaker
"Do you have any resources or info you can throw my way so I can better understand what does and doesn't break a batch?"
1. changing shader and/or setting uniforms
2. changing texture page (handled internally in GM. implicitly changing texture group also causes a batch break, and this too is handled by GM internally)
3. changing surface target
4. some primitives sometimes (though that may have changed now)
5. drawing tilemaps
6. draw_clear()
7. changing blend mode
8. changing matrices
9. vertex_submit (a batch is literally a vertex buffer)
10. rendering out different views
11. probably moving between Draw events? seems likely
@DragoniteSpam

Copy link
Copy Markdown
  1. Almost anything that starts with gpu_set_ except for gpu_set_depth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment