⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mdlfps.bas

📁 一款VB编写的时实光线跟踪的实例.需要用VB工具打开.
💻 BAS
字号:
Attribute VB_Name = "mdlFPS"
Option Explicit

'//Realtime raytracer
'//Original (c++) version and other nice
'//Raytrace versions (with shadows, cilinders, etc)
'//Can be found at http://www.2tothex.com/
'//VB port by Almar Joling / quadrantwars@quadrantwars.com
'//Websites: http://www.quadrantwars.com (my game)
'//          http://vbfibre.digitalrice.com (Many VB speed tricks with benchmarks)

'//This code is highly optimized. If you manage to gain some more FPS
'//I'm always interested =-)

'//Finished @ 01/03/2002
'//Feel free to post this code anywhere, but please leave the above info
'//and author info intact. Thank you.


Private Declare Function GetTickCount Lib "kernel32" () As Long

Private lngTimer As Long
Private intFPSCounter As Integer
Private intFPS As Integer

Public Function GetFPS() As Long
    '//Count FPS
    If lngTimer + 1000 <= GetTickCount Then
        lngTimer = GetTickCount
        intFPS = intFPSCounter + 1
        intFPSCounter = 0
    Else
        intFPSCounter = intFPSCounter + 1
    End If
    
    '//Return FPS
    GetFPS = intFPS
End Function

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -