Skip to content

Commit

Permalink
Fix screenshot capture in fullscreen mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
HackerPoet committed Feb 28, 2021
1 parent 4aad2ba commit 8541725
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ typedef void (*Fractal)(double&, double&, double, double);
static Fractal fractal = nullptr;

//Blend modes
const sf::BlendMode BlendAlpha(sf::BlendMode::SrcAlpha, sf::BlendMode::OneMinusSrcAlpha, sf::BlendMode::Add);
const sf::BlendMode BlendIgnoreAlpha(sf::BlendMode::One, sf::BlendMode::Zero, sf::BlendMode::Add);
const sf::BlendMode BlendAlpha(sf::BlendMode::SrcAlpha, sf::BlendMode::OneMinusSrcAlpha, sf::BlendMode::Add,
sf::BlendMode::Zero, sf::BlendMode::One, sf::BlendMode::Add);
const sf::BlendMode BlendIgnoreAlpha(sf::BlendMode::One, sf::BlendMode::Zero, sf::BlendMode::Add,
sf::BlendMode::Zero, sf::BlendMode::One, sf::BlendMode::Add);

//Screen utilities
void ScreenToPt(int x, int y, double& px, double& py) {
Expand Down Expand Up @@ -277,7 +279,7 @@ void SetFractal(sf::Shader& shader, int type, Synth& synth) {
void resize_window(sf::RenderWindow& window, sf::RenderTexture& rt, const sf::ContextSettings& settings, int w, int h) {
window_w = w;
window_h = h;
rt.create(w, h, settings);
rt.create(w, h);
window.setView(sf::View(sf::FloatRect(0, 0, (float)w, (float)h)));
frame = 0;
}
Expand Down

0 comments on commit 8541725

Please sign in to comment.