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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - RaySteak

Pages: [1]
1
Graphics / Re: Most efficient way of rendering pixel by pixel?
« on: November 01, 2018, 01:50:20 pm »
It was a caching issue apparently. Storing the pixels in the array row wise instead of line wise seems to have fixed it.

2
Graphics / Re: Most efficient way of rendering pixel by pixel?
« on: October 31, 2018, 06:24:41 pm »
Thanks! with Texture.update() i get about 10-15 more fps.

3
Graphics / Most efficient way of rendering pixel by pixel?
« on: October 31, 2018, 05:44:26 pm »
Hi,
I'm making a simple raycasting engine and I'd like to change the color of each pixel individually but the problem is that I haven't been able to find a method of doing it efficiently. I've tried using an Uint8 array:
 sf::Uint8 *canvas= new sf::Uint8[SCREEN_H*SCREEN_W*4];  
that I pass to an sf::Image after it's ready to be displayed. The problem is that accessing arrays this big seems to be quite slow which results in about 40 fps at 1280*720. Are there any better methods of drawing a pixel by pixel image to the window?
Thanks!

Pages: [1]
anything