Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualKaptein

Posted 26 December 2012 - 06:56 PM

well, one draw call is ALOT faster on a gpu than say 200 draw calls
additionally, you should have a tile map that contains each tile on the same texture
and draw from that single texture for each quad, and avoid binding new textures as much as possible

the fastest solution is this:
one texture, one VBO, one draw call

an alternative method is using 2D texture arrays for tiles, which simplifies things greatly
since you wont need to separate textures to avoid mipmapping "incidents" due to filtering
using texture 2D array feature, it will still be only 1 texture bind

what i would try, is have 1 mesh, that consists of 3x3 planes that are tilesheets
that way i only need 1 bind, and i can render subsets of the 3x3 planes depending on camera position
it will make smooth scrolling easier (but dont take my word for it, since i do mostly 3D)

good luck

#1Kaptein

Posted 26 December 2012 - 06:53 PM

well, one draw call is ALOT faster on a gpu than say 200 draw calls<br />additionally, you should have a tile map that contains each tile on the same texture<br />and draw from that single texture for each quad, and avoid binding new textures as much as possible<br /><br />the fastest solution is this:<br />one texture, one VBO, one draw call<br /><br />an alternative method is using 2D texture arrays for tiles, which simplifies things greatly<br />since you wont need to separate textures to avoid mipmapping "incidents" due to filtering<br />using texture 2D array feature, it will still be only 1 texture bind<br /><br />good luck<br />

PARTNERS