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

Author Topic: drawing cosine pixel by pixel  (Read 1292 times)

0 Members and 1 Guest are viewing this topic.

EGYPTIAN CODER

  • Newbie
  • *
  • Posts: 32
    • View Profile
    • Email
drawing cosine pixel by pixel
« on: May 03, 2017, 12:01:40 am »
hello every one ;
I want to draw cosine function or any function
and what i do is setting a rectangle shape size to 1 (to be a pixel )

but I think this is not the best way to do it or I am wrong because it was slow not much but it was slow

I draw the cosine function  for a determined range;

well, I i know that if i just did one drawing to the function and one display  things will be fine  8),but I want
to handle input that affect the function graph so one drawing and displaying is bad in this situation :(;


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: drawing cosine pixel by pixel
« Reply #1 on: May 03, 2017, 10:53:09 am »
You can use a sf::VertexArray of sf::Points.
Laurent Gomila - SFML developer