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

Author Topic: Trouble with render texture and OpenGL  (Read 902 times)

0 Members and 1 Guest are viewing this topic.

xoxalph

  • Newbie
  • *
  • Posts: 4
    • View Profile
Trouble with render texture and OpenGL
« on: September 24, 2014, 05:29:15 pm »
Hi. I'm trying to implement an in-game camera similar to Fatal Frame. What I figured out is first drawing the scene in front of the camera, and then the scene the player actually sees.

I have a render texture that everything is drawn to, which I use for post-processing. What I do is copy the texture data from it to a regular sf::texture right after rendering the camera scene, and then I use that sf::texture as the camera screen for this sort of effect. http://i.imgur.com/1pvB9Tp.gif

Anyway, copying the texture data of the render texture really slows everything down. If I disable it, the FPS jumps from ~200 to ~1500. I tried simply using the render texture itself as a camera screen, which just leads to artifacts. http://i.imgur.com/4yy54h5.png
Is there a better way to do this?

Thanks

EDIT: Never mind, I'll just use multiple FBOs for it. Solved.
« Last Edit: September 24, 2014, 07:02:51 pm by xoxalph »