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

Author Topic: Slow rendering?  (Read 2033 times)

0 Members and 1 Guest are viewing this topic.

zweifel

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Slow rendering?
« on: August 05, 2013, 05:55:53 pm »
Hi!

My objective is to have many (5 or so) textures plotted on the same place which have a dynamic (software set) alpha.
So here is a small test I did.
I am drawing a texture two times on the screen and I am getting 60FPS only (both have the alpha set entirely to 1, a better example would be one with alphas summing 1). From my experience this seems very slow.
My machine is running linux and SFML 2.0. I can add more details about it upon request.

My question is: Don't you think it is slow? Do you think multi-texturing with GLSL would be a faster solution?
Threads? This is another question I have (because it made my simple code unstable), but I think it would be better to post on the System tab. If anyone want to take a look at my code with threads it is posted here:
http://en.sfml-dev.org/forums/index.php?topic=12521.0

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Slow rendering?
« Reply #1 on: August 05, 2013, 06:03:01 pm »
Vertical synchronization is probably activated in your graphics card's control panel. Set it to "controlled by application" instead.
Laurent Gomila - SFML developer

zweifel

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Slow rendering?
« Reply #2 on: August 07, 2013, 05:28:53 am »
Thanks Laurent for the fast response. Good point, but since I can increase the FPS when decreasing the number of calls to the drawing function, I think that is not the case right? In other words, Am I correct to assume that if vsync was already activated by the card, I would never get more than 60 FPS?

I did some tests and the answer to my question is: no. It is not a slow rendering problem.
Just my notebook is limited to 112 FPS with 2 drawings (60 FPS when I increase the scale). If I scale the size of the window to be rendered, it decreases the FPS. I do not remember the OpenGL pipeline, but would not culling help somewhat in this rasterization process by eliminating the out of the screen object?
Is there something in the shader that can be done to help in this respect?