Hello, a few forewords, i am very new to SFML, i am using CSFML2(although my problem doesnt seem to be with the C bindings at all) and not using any openGL directly.
I am working on a little system that takes a bunch of sprites that are tiles for a map and draws them to the screen in chunks of 32 by 32 tiles at a time.
Previously i had been storing a position for each chunk in screen coordinates and each frame looping over each tile and re positioning the sprite for that tile to the
chunkPosition + (tilesize * chunkTilePosition) then drawing each tile.
I know not the most efficient way of doing it but it works fine on my main computer but there is a bit of slowing on my little laptop so i thought of a better, obvious but new to me, way to do it.
My idea was to use a RenderTexture and instead of drawing the sprites onto the screen each frame, just draw the sprites to the RenderTexture once and then just draw the RenderTexture to the screen with a sprite at the chunk position and you have your entire chunk generated into a static image once and drawn easily.
Now this works on its own and i am getting the tiles onto the screen some of the chunks, not all, seem to be flipped and i cannot figure out why.
I am using the exact same loop to draw the sprites as i did with the first method just removed adding the chunks position to the tile position and drawing onto the RenderTexture rather then the screen.
I cant for the life of me figure out why the chunk would be flipped at all, can anyone help me out with this or even have some tips?
Thanks in advance to anyone kind enough to lend assistance.
EDIT: haha, this was in the hopes to increase performance atleast on the only computer i have that isnt way to fast to do performance testing... the version that uses RenderTexture causes it to BSOD upon launch of the app. I guess RenderTexture has a problem with the intelGPU then, is that documented?
EDIT:
quick demonstration of problem, first picture is what i want and how it works when i render to the screen, the second is rendering to RenderTexture. Although the next chunk down doesnt appear to be flipped but the one to its left does, and as far as i can see, neither in any predictable direction but i may be wrong there as the tiles are generated proceduraly off of the same seed, i don't know them that intimately nor are they so unique to me to be able to instantly tell if they are all flipped in one direction or something.