1
Graphics / Optimizing tilerendering
« on: March 15, 2011, 09:42:09 pm »Quote from: "Gibgezr"
Quote from: "l0calh05t"why not use the wrapping texture capability of opengl? no need to "shuffle" all rows. just update a single row/column and your texcoords. should be even faster.
Not sure how to implement that, as adjusting texcoords adjusts the coords across the entire buffer...ahhh, I see, shift the texcoords, then update the rest of the buffer? How do I get access to the texcoords of an sfml sprite object?
For me personally, it wouldn't be worth the hassle writing that, especially if you are using sfml; the whole point of sfml for 2D graphics is to use sfml sprites and the nice, clean OO interfaces. If I was going to muck around with texcoords, I'd probably go straight to OpenGL and forgo sfml.
Dunno really, I use OpenGL directly most of the time anyways. I think Get/SetSubRect might be used for this, although it depends on which wrapping mode SFML uses.