我学OpenGL编程有一段时间了,我发现一个很奇怪的现象:我的FPS(Frame per Second)总是保持在60左右,无论程序很简单还是有点复杂。实际上,我的电脑是去年买的性能不错。显卡是nVidia GTX570,CPU是I7。
于是我做了一个实验:在我的电脑和我朋友的电脑上运行同一个程序。这个程序实现了阴影映射:
我电脑的FPS大概是60左右。但是我在朋友的电脑上运行时,FPS超过了400。
但是我的电脑的性能明显比他的好。现在我把我们电脑的参数贴出来。
我的电脑:
tgt.init (Info) GLEW version: 1.7.0
tgt.GpuCapabilities (Info) OS version: Windows 7 (build 7600)
tgt.GpuCapabilities (Info) OpenGL Version: 4.2.0
tgt.GpuCapabilities (Info) OpenGL Renderer: GeForce GTX 570/PCIe/SSE2
tgt.GpuCapabilities (Info) GPU Vendor: NVIDIA Corporation (NVIDIA)
tgt.GpuCapabilities (Info) Texturing: yes, max size: 16384, 3D: yes, max 3D size: 2048
tgt.GpuCapabilities (Info) Texture features: 32 units, NPOT, rectangles, compression, 16x anisotropic
tgt.GpuCapabilities (Info) Framebuffer Objects: yes, max 8 color attachments
tgt.GpuCapabilities (Info) Shaders: yes (OpenGL 2.0), GLSL Version 4.20, Shader Model 5.0
tgt.GpuCapabilitiesWindows (Info) Graphics Driver Version: 8.17.12.9573
tgt.GpuCapabilitiesWindows (Info) Graphics Driver Date: 2012-02-09
tgt.GpuCapabilitiesWindows (Info) Graphics Memory Size: 1280 MB
我朋友的电脑:
tgt.GpuCapabilities (Info) OS version: Windows 7 Service Pack 1 (build 7601)
tgt.GpuCapabilities (Info) OpenGL Version: 4.2.11566 Compatibility Profile Context
tgt.GpuCapabilities (Info) OpenGL Renderer: AMD Radeon HD 6620G
tgt.GpuCapabilities (Info) GPU Vendor: ATI Technologies Inc. (ATI)
tgt.GpuCapabilities (Info) Texturing: yes, max size: 16384, 3D: yes, max 3D size: 8192
tgt.GpuCapabilities (Info) Texture features: 16 units, NPOT, rectangles, compression, 16x anisotropic
tgt.GpuCapabilities (Info) Framebuffer Objects: yes, max 8 color attachments
tgt.GpuCapabilities (Info) Shaders: yes (OpenGL 2.0), GLSL Version 4.20, Shader Model 5.0
tgt.GpuCapabilitiesWindows (Info) Graphics Driver Version: 6.14.10.11566
tgt.GpuCapabilitiesWindows (Info) Graphics Driver Date: 2012-03-09
tgt.GpuCapabilitiesWindows (Info) Graphics Memory Size: 512 MB
我很好奇,我想不通。我应该对显卡进行一些设置吗?有人能告诉我如何解决这个问题吗?