PixelShaderCheck

From NSIS Wiki
Jump to navigationJump to search
Author: Jiaozi (talk, contrib)


Links

Download:
Pixelshader.zip (7 KB)

Description

Version: 1.0

This plugin gives you the Pixel Shader version actually supported by your graphics card. It relies on DirectX 9 or later. If DirectX 9 is not installed, it will return a zero version (0.0).

For example, Microsoft XNA Framework 2.0 requires at least Pixel Shader v1.1 but 2.0 is recommended and required for some Starter Kits.


Syntax

PixelShader::GetPixelShaderVersion

Examples

; Ensure that the Pixel Shader fulfill requirement
Function CheckGraphicsCardCapabilities
 
  PixelShader::GetPixelShaderVersion
  Pop $R0
  Pop $R1
  ${Unless} $0 >= 2
    MessageBox MB_ICONEXCLAMATION|MB_OK "$(^Name) requires a graphics card that have at least Pixel Shader Version 2. Try updating your graphics card driver."
    Quit
  ${EndUnless}
FunctionEnd