GSDP:GAM100/CProcessing/CP System GetFrameRate()

From Inside
Jump to: navigation, search

CP_System_GetFrameRate()

Description

Returns the current frames per second.

Example

void update(void) 
{
    // print the current frame rate to the center of the window
    CP_Settings_TextSize(200);
    CP_Settings_TextAlignment(CP_TEXT_ALIGN_H_CENTER, CP_TEXT_ALIGN_V_MIDDLE);
    CP_Settings_Background(CP_Color_Create(200, 200, 200, 255));
    CP_Settings_Fill(CP_Color_Create(100, 20, 100, 255));
    
    float currentFrameRate = CP_System_GetFrameRate();
    
    char buffer[16] = { 0 };
    sprintf_s(buffer, _countof(buffer), "%.1f", currentFrameRate );
    CP_Font_DrawText(buffer, 200, 200);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>