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

Author Topic: modify single pixel(s)  (Read 1372 times)

0 Members and 1 Guest are viewing this topic.

fsteff

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
modify single pixel(s)
« on: May 05, 2012, 07:57:10 pm »
Hi,
I´m actually working on a simple voxel raycasting engine.
I need to set every single pixel seperate.
I actually use SDL for this, but it is much too slow for this -.-
Is there a possibility in SFML to do this faster? I need about 30 fps in full hd.
If not, can you tell me how to do this?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: modify single pixel(s)
« Reply #1 on: May 05, 2012, 10:31:31 pm »
The fastest solution is to work on your own array of pixels in system memory, and then upload it to the graphics card with sf::Texture::update and draw it with a sprite.
Laurent Gomila - SFML developer

fsteff

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: modify single pixel(s)
« Reply #2 on: May 06, 2012, 11:29:22 am »
thanks, i´ll try that! ;)

 

anything