This page is dedicated to NVIDIA Cg
support in Borland Delphi and C++Builder (including Borland C++). Starting from release 1.5 of Cg I've added official
support for FreePascal 2.0. Here you can find headers, helper DLL's what allows NVIDIA Cg to be used with above mentioned
compilers. Also samples of Cg usage are provided.
Currently Release 1.5 beta2 of NVIDIA Cg dated May-2006 is supported
Also you can find Release 1.4 (Jun-2005), Release 1.3 (Jan-2005), Release 1.2 (Feb-2004), Release 1.1 (Mar-2003) and
Beta 2.1 (Sep-2002) of NVIDIA Cg Toolkit for Borland tools (with examples) at bottom of page.
NVIDIA Cg is high level C-like language for writing pixel and vertex shaders.
Delphi/C++Builder toolkit allows to use this language internaly in your programs either in
DirectX or OpenGL. Cg programs are compiled internally in PixelShader/VertexShader programs
under DirectX and to register combiners and VertexPrograms under OpenGL. This behaviour
allows to use NVIDIA Cg language in DirectX 8.x applications on any DX8 class GPU - like
ATi Radeon 8500, SiS Xabre, Matrox Parhelia, 3DLabs P10, ets. And now for DirectX9 class cards:
Radeon 95xx/X800/X1xxx and GeForceFX, GeForce6, GeForce7, GeForce8 series!
Release 1.5 of the NVIDIA Cg Toolkit includes the following features and improvements:
Release 1.4 of the NVIDIA Cg Toolkit includes the following features and improvements:
- OpenGL GLSL profiles
- Direct3D9 SM3.0 profiles
- Procedural API for Effect creation (COLLADA support)
- Program combining for inter-program optimization
- Rewrite of major portions of the Cg Runtime for enhanced performance
- Cg 1.3 and 1.4 style Effects files supported
- Cg 1.5 Beta 1 should be backward compatible with apps written against Cg 1.4.1.
- Runtime now supports loading pre-compiled objects through runtime API (CG_OBJECT for cgCreateProgram)
- Significantly improved code generation in most of the profiles
- Complete rewrite of CgFX. CgFX now works on all platforms, and works on non-NVIDIA OpenGL drivers. Substantial documentation for CgFX will be coming in a subsequent build of Cg 1.4
- CgFX now supports unsized arrays and Interfaces
- Substantially faster at compiling many long shaders, especially those that make heavy use of Cg’s “Interfaces” feature
- The Cg Runtime is now substantially faster in many cases
- Cg 1.4 now ships with native implementations for Win32, Win64, Linux (32-bit and 64-bit), and MacOS 10.3 (Panther) and 10.4 (Tiger)
Note that some of this new functionality is currently only supported when using the CgGL OpenGL runtime library. The Direct3D-specific Cg runtime libraries currently do not support shared parameters, for example. We have also not yet provided Direct3D profiles for Shader Model 3.0.
All Cg 1.2 or Cg 1.3 programs should work with Cg 1.4 without the need to recompile the program. The compiler, runtime, and standard library changes were all made to be backward compatible. However, programs which used previous versions of CgFX will require changes, both to the calling application code, and also to the effect files. CgFX has been completely rewritten and is now incorporated directly into the Cg Runtime libraries.
Release 1.3 of the NVIDIA Cg Toolkit includes the following features and improvements:
Release 1.2 of the NVIDIA Cg Toolkit includes the following features and improvements:
- New 'vp40' profile, which enables texture sampling from within vertex programs
- New 'fp40' profile, which provides a robust branching model in fragment programs, and support for output to multiple draw buffers (‘MRTs’)
- Support for writing more than one color output (i.e., ‘MRTs’) in the arbfp1 and ps_2* profiles
- New semantics to access OpenGL fixed-function state vectors from within ARB_vertex_program and ARB_fragment_program
- New ‘-fastprecision’ option for arbfp*, fp30, and fp40 profiles, to use reduced precision storage (fp16) when appropriate.
- Interfaces, a language construct that facilitates the creation of general, reconfigurable Cg programs
- Unsized arrays
- Parameter instances may be created and shared between multiple programs
- Parameters may be marked as compile-time constants, leading to more efficient compiled code
- enhancements in many other areas
In Release 1.1 of Cg Toolkit support for CgFX were added. CgFX is file format compatible with
MS DirectX 9.0 Effect file 2.0. Main difference between MS and NVIDIA tools: NVIDIA CgFX allows to use FX 2.0
files not only in DirectX9 but in DirectX8 and OpenGL.
Note: You will need to download and install NVIDIA Cg toolkit (available
Info field below contains Name / Date / Size with links to file and
description field contains some notes about sample and screenshot from run-time.
NVIDIA Cg headers and libraries
Delphi and FreePascal adaptation of NVIDIA Cg headers.
This release contains seven Direct3D examples of Cg runtime usage. Examples start from empty Direct3D device window
and go up to multitexturing and vertex shaders programming.
C++Builder libraries required to compile against NVIDIA Cg toolkit.|