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 - Blacksmith

Pages: [1]
1
Graphics / Re: Drawing Visual Noise Quickly
« on: September 03, 2021, 09:54:23 pm »
You're probably right. I like doing everything programmatically, but I guess I'll have to settle for using prebaked images.

2
Graphics / Drawing Visual Noise Quickly
« on: September 02, 2021, 11:15:53 pm »
Hello,

I'm currently working on a small game project to learn SFML. I would like (for stylistic purposes) for the background of every frame to be visual noise rather than a flat color. To do this, I am clearing the window with sf::Color::Black, and then drawing my chosen noise color to each pixel of an sf::Image with a pseudorandom alpha value, then copying that image into a texture and then finally into a sprite which is drawn to the window.

This seems to be the intended way to draw something to the screen that we want to be able to manipulate pixel by pixel, as sf::Image is not drawable. However, it is very slow. I am only managing ~20 FPS. Is there something I'm missing here that would greatly speed up the process of drawing visual noise?

Code:
(click to show/hide)

Pages: [1]