예제 #1
0
void I_FinishUpdate2 () {

    PSP2_Video_FillScreen(0);

	//sceGuDrawBuffer(GU_PSM_8888,(void*)0,BUF_WIDTH);
	//sceGuDispBuffer(SCR_WIDTH,SCR_HEIGHT,(void*)FRAME_SIZE,BUF_WIDTH);
	//sceGuDepthBuffer((void*)(FRAME_SIZE*2),BUF_WIDTH);
	//sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2));
	//sceGuViewport(2048,2048,SCR_WIDTH,SCR_HEIGHT);
	//sceGuDepthRange(0xc350,0x2710);
	//sceGuScissor(0,0,SCR_WIDTH,SCR_HEIGHT);
	//sceGuEnable(GU_SCISSOR_TEST);
	//sceGuFrontFace(GU_CW);
	//sceGuEnable(GU_TEXTURE_2D);
	//sceGuClear(GU_COLOR_BUFFER_BIT|GU_DEPTH_BUFFER_BIT);
	//sceGuFinish();
	//sceGuSync(0,0);

	//sceDisplayWaitVblankStart();
	//pspDebugScreenClear();

	//sceGuDisplay(GU_TRUE);
}
예제 #2
0
void DisplayFPS()
{
    uint64_t currentTick = 0;

    int result = sceRtcGetCurrentTick(&currentTick);
    if (result != 0)
    {
        printf("sceRtcGetCurrentTick : 0x%x\n", currentTick);
    }

    uint64_t difference = currentTick - lastTick;
    lastTick = currentTick;

    int fps = sceRtcGetTickResolution() / (int) difference;
    fpsTimes[fpsIndex] = fps;

    if (++fpsIndex == FPS_TIMES_COUNT)
    {
        fpsIndex = 0;
    }

    fps = 0;

    int i;
    for (i = 0; i < FPS_TIMES_COUNT; ++i)
    {
        fps += fpsTimes[i];
    }

    fps /= FPS_TIMES_COUNT;

    PSP2_Video_FillScreen(SCREEN_W * 200);

    sprintf(fpstext, "FPS: %d", fps);
    mh_print(5, 5, fpstext, RGBA8(0, 255, 0, 255), 0, 0);

}
예제 #3
0
파일: i_main.c 프로젝트: malev/Vita_Doom
void pgFillvram(unsigned long color)
{
    PSP2_Video_FillScreen(color);
}