Show differencesHistory of post edits
#ActualMausGames
Posted 30 December 2012 - 05:05 AM
For example: with (-tileSize*i) you are going left but with (tileSize*i)+tileSize you are going right and therefore stretching the whole quad with each iteration.
Reconsider how you have to place your vertices in order to achieve your goal - try to remove the minus-operators.
Later on you can try to draw triangle-strips which are faster than quads, and even use indices and vertexbuffers.
Best regards
- Martin
#2MausGames
Posted 30 December 2012 - 05:05 AM
For example: with (-tileSize*i) you are going left but with (tileSize*i)+tileSize you are going right and therefore stretching the whole quad with each iteration.
Reconsider how you have to place your vertices in order to achieve your goal - try to remove the minus-operators.
Later onyou can try to draw triangle-strips which are faster than quads, and even use indices and vertexbuffers.
Best regards
- Martin
#1MausGames
Posted 30 December 2012 - 05:04 AM
Your glVertex3f-calls look weird. You are drawing quads which get bigger and bigger and this results in z-fighting like on your screenshot.
For example: with (-tileSize*i) you are going left but with (tileSize*i)+tileSize you are going right and therefore stretching the whole quad with each iteration.
Reconsider how you have to place your vertices in order to achieve your goal - try to remove the minus-operators.
Later you can try to draw triangle-strips which are faster than quads, and even use indices and vertexbuffers.
Best regards
- Martin