SDL 2.0 Line Function Jaggy

Started by
1 comment, last by a light breeze 9 months, 3 weeks ago

I need to draw an isometric grid in sdl 2.0. Not the isometric tiles themselves but the grid outline of the isometric squares. I saw some demos of the line function and the lines are pretty jaggy. Is this the recommended way to handle this or should I somehow use the point function. I am new too SDL so im not sure which is best or if the lines will be in fact jaggy in isometric like I saw on the other line demos.

Advertisement

Recommended way for drawing a isometric grid in SDL:

  • Draw an isometric grid in your favorite pixel art editor.
  • Export as png.
  • Load the png in SDL as a texture.
  • Draw the texture in SDL.

Don't use the line drawing functions in SDL. They are not pixel-accurate. That's not the fault of SDL, but of the underlying graphics APIs/drivers/hardware.

This topic is closed to new replies.

Advertisement