| View previous topic :: View next topic |
| Author |
Message |
charnold
Joined: 10 Sep 2005 Posts: 10
|
Posted: Sun May 20, 2007 6:55 am Post subject: 60 FPS limit |
|
|
I missing something and can't see it :-( ... I have disabled sceDisplayWaitVblankStart, but still don't get more than 60 fps. (using FW 3.40 OE-A)
That's how the rendering is finished:
| Code: |
void finishRendering()
{
sceGuFinish();
sceGuSync(0,0);
// sceDisplayWaitVblankStart();
sceGuSwapBuffers();
}
|
That are the functions for getting the elapsed time per frame and adding the frames per second:
| Code: |
clock_t frameticks, currentticks, startticks;
float getElapsedTime()
{
currentticks = clock();
frameticks = (currentticks - startticks);
float fElapsedTime = float(frameticks/(float)CLOCKS_PER_SEC);
startticks = currentticks;
return fElapsedTime;
}
int getFramesPerSec(float fElapsedTime)
{
static int fps = 0;
static int frames = 0;
static float time = 0;
frames++;
time += fElapsedTime;
if (time >= 1)
{
fps = frames;
time = 0.0f;
frames = 0;
}
return fps;
}
|
|
|
| Back to top |
|
 |
Cpasjuste
Joined: 29 May 2005 Posts: 214
|
Posted: Sun May 20, 2007 8:01 am Post subject: |
|
|
| Did you tried to remove "sceGuSync(0,0);" for testing ? |
|
| Back to top |
|
 |
Insert_witty_name
Joined: 10 May 2006 Posts: 376
|
Posted: Sun May 20, 2007 8:04 am Post subject: |
|
|
| Make sure you're using sceCtrlPeekBufferPositive and not sceCtrlReadBufferPositive. |
|
| Back to top |
|
 |
charnold
Joined: 10 Sep 2005 Posts: 10
|
Posted: Sun May 20, 2007 9:13 am Post subject: |
|
|
| Insert_witty_name wrote: | | Make sure you're using sceCtrlPeekBufferPositive and not sceCtrlReadBufferPositive. |
aah, that was it :-) great thanks! |
|
| Back to top |
|
 |
|