60 FPS limit

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
charnold
Posts: 10
Joined: Sat Sep 10, 2005 9:32 pm

60 FPS limit

Post by charnold »

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: Select all

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: Select all

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;
}

Cpasjuste
Posts: 214
Joined: Sun May 29, 2005 8:28 am

Post by Cpasjuste »

Did you tried to remove "sceGuSync(0,0);" for testing ?
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Make sure you're using sceCtrlPeekBufferPositive and not sceCtrlReadBufferPositive.
charnold
Posts: 10
Joined: Sat Sep 10, 2005 9:32 pm

Post by charnold »

Insert_witty_name wrote:Make sure you're using sceCtrlPeekBufferPositive and not sceCtrlReadBufferPositive.
aah, that was it :-) great thanks!
Post Reply