Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Polygon problem. adding points the right way getting weird image?  (Read 2050 times)

0 Members and 1 Guest are viewing this topic.

Despairy

  • Newbie
  • *
  • Posts: 14
    • View Profile
hi i tried to make a tetris polygon
the FLIPPED L shape and this is what i get


http://imageshack.us/photo/my-images/38/goodab.gif

if you see the points are inserted in the right order
top left
top right
bottom right
bottom middle
middle middle
middle left

for some reason the shape is all messed up
any ideas? debugging showed the points are inserted well and i HAVE NO CLUE!

thanks!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Polygon problem. adding points the right way getting weird image?
« Reply #1 on: March 26, 2012, 04:25:10 pm »
Your shape is not convex, you cannot use SFML shape classes.
Laurent Gomila - SFML developer

Despairy

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Polygon problem. adding points the right way getting weird image?
« Reply #2 on: March 26, 2012, 04:43:56 pm »
didnt know that ... O_O thanks

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11016
    • View Profile
    • development blog
    • Email
Re: Polygon problem. adding points the right way getting weird image?
« Reply #3 on: March 26, 2012, 04:47:00 pm »
didnt know that ... O_O thanks

It's written in the documentation...  ::)

Btw if you don't want to write your own class, the Thor library has already one.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/