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

Pages: [1]
1
Graphics / Re: Low framerate for empty rendering?
« on: August 11, 2013, 09:36:21 pm »
You don't have an event loop in your test app : this loop is needed (event if you don't use events). It may reduce the app's performances.
I'm pretty convinced now that I'm getting nearly the maximum performance I can, I'm curious about what you've said though. How can not having an event loop slow my performance down?

2
Graphics / Re: Low framerate for empty rendering?
« on: August 11, 2013, 08:55:13 pm »
I thought I recalled seeing glxgears run at 20,000+ fps on one of my machines before so I just assumed that's what a really simple OpenGL application should be able to do (try this out more recently is yielding similar numbers as to what my empty application is getting). Having written some CUDA programs recently I've seen how much can be done in half a millisecond and was a little surprised I wasn't getting more.

Looks like my assumption that I could do better was flawed, thanks for the insight. This certainly hasn't stopped me from developing my application, just wanted to be sure I understood the performance here.

3
Graphics / Low framerate for empty rendering?
« on: August 11, 2013, 08:05:29 am »
Hi, I've recently noticed that I don't get much more than 1700fps when rendering to a window even if the rendering really does nothing. Here is the test program I've been using:
#include <GL/glew.h>
#include <SFML/System/Clock.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <cstdio>

int main() {
  sf::ContextSettings cs(0, 0, 0, 3, 2); /* Request OpenGL 3.2 */
  sf::Window *mainWindow = new sf::Window(sf::VideoMode(1200, 600, 32),
    "SFML Test", sf::Style::Default, cs);
  mainWindow->setVerticalSyncEnabled(false);
  sf::Clock calcClock;
  int frames = 0;
  while(mainWindow->isOpen()) {
    glClear( GL_COLOR_BUFFER_BIT );
    mainWindow->display();
    frames++;
    if(frames >= 1000) {
      int calcTicks = calcClock.getElapsedTime().asMilliseconds();
      printf("FPS: %f Frames: %i Ticks: %i\n", frames/(calcTicks / 1000.0f),
          frames, calcTicks);
      frames = 0;
      calcClock.restart();
    }
  }
  return 0;
}
Any idea why I'm being limited to this? I can get things a bit faster if I fullscreen it, but I'm still not getting anything close to 10,000fps like I would expect when I'm doing so little. I'm not sure if this is because of overhead in SFML or something else. Anyone care to enlighten me?

Pages: [1]