Author Topic: VBL sync & OpenGL  (Read 9898 times)

0 Members and 1 Guest are viewing this topic.

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: VBL sync & OpenGL
« Reply #20 on: August 18, 2007 »
Quote
Then if this is the solution, what's the point in having OpenGL with hardware acceleration and so-called standard extensions if they're not that standard or if the app cannot drive the VBL?
Yeah dude that suxx, we know... :(

IMHO, the best solution is that one by Jim and StoneMonkey, those guys are specialist, they know what they are talking about, btw I'm using something like Jim have used in his intro but using high performance counter/frequency and I've posted an example in this forum sometime ago ...


Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: VBL sync & OpenGL
« Reply #21 on: August 18, 2007 »
The best timers to use (and the only timers Microsoft now recommend for multi-core CPUs) are
QueryPerformanceFrequency()/QueryPerformanceCounter().  Anything else might be subject to problems, especially solutions using 'rdtsc' instruction directly.

60Hz might be OK for new old-school stuff, the problem is if you're trying to emulate a demo from a European AtariST or Amiga (or even a ZX Spectrum) you need to work at 50Hz which most PCs don't support (most monitors won't sync that low).

Jim
Challenge Trophies Won: