[C #] [DxLib] FPS does not appear at all! ?? In such a case, just adding a single line of code may explode at once.

less than 1 minute read

Overview

By adding only one line this time, FPS may increase ? I will introduce the method called.
This article solves the above problem using the functions of the DX library.
Copy and paste the sample code, or if possible, memorize and copy the required functions.

Thing you want to do

DxLib I want to use the existing function and raise the FPS to some extent.

Example

You can delete the DX.SetDrawScreen (DX.DX_SCREEN_BACK); before the while.

 //Main loop
 while (DX.ProcessMessage() != -1)
 {
     //Set the drawing destination to the back screen
     SetDrawScreen(DX.DX_SCREEN_BACK);
     //Clear the screen
     DX.ClearDrawScreen();

     //
     //processing();
     //

     //Reflect the contents of the back screen on the front screen
     DX.ScreenFlip();
 }

Description

``` SetDrawScreen (DX.DX_SCREEN_BACK); ` This function was called at the beginning of the while process.
Is it okay to put such a function in the loop? I’m sure some of you may be worried, but please be assured that it will not interfere with the screen and processing.

Tags:

Updated: