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

Author Topic: Copy screen to the texture?  (Read 1520 times)

0 Members and 1 Guest are viewing this topic.

Azzello

  • Newbie
  • *
  • Posts: 3
    • View Profile
Copy screen to the texture?
« on: July 06, 2016, 07:43:49 am »
Hello!

I am currently working on a simple pong game. For practice I wanted to implement a simple bloom on every object. Doing some research I kinda found the solution but for that I need to draw objects to screen, then take that whole screen and draw it again with a shader. So what I am looking for here is some way to take the texture of the screen once I've drawn all of objects. Any hints on how to do it?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Laurent Gomila - SFML developer

Azzello

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Copy screen to the texture?
« Reply #2 on: July 06, 2016, 08:23:04 am »
Thanks! Is it possible to use it with sf::RenderWindow or is it sf::Window only?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Copy screen to the texture?
« Reply #3 on: July 06, 2016, 08:38:14 am »
sf::RenderWindow inherits from sf::Window.

Don't hesitate to read the documentation and tutorials to answer such simple questions ;)
Laurent Gomila - SFML developer

Azzello

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Copy screen to the texture?
« Reply #4 on: July 06, 2016, 09:36:29 am »
I apologize :D Thank you for your answers!

 

anything