GLSL is good, but it has problems with wide range of card support (we had various issues especially with SGI, ATI and NV hardware specific problems - like fog). ARB is generally supported by all cards with pixel and vertex shaders (even back to the old GF3 cards). You'll find the example should run on pretty much any GPU - GLSL doesnt do this well. And for higher level coding, imho Cg is probably the best if you are happy to stick with NV solutions (briliiant debugging tools too). Of course.. this is rarely the case.. really DX is a far better choice regardless.
There are a few other shader languages for OGL too - but few that are as nice as HLSL for instance for wide GPU support, one of the problems with OGL is its shader support - quite horrible even at the best of times. Its a pity because the OGL API is quite easily the best API around for gfx, its just been horribly mangled with extensions.
I agree shader designer apps like ShaderX, RenderMonkey and FX are all great tools for shader design, but few people realise the problems with integration from an app like those - you need to use the same env/temps/param setups as the programs, and this can often conflict with the design of the system that you have created. Shaders are a minefield of problems - this is simply a base example to get ppl running shaders in just over 2 pages of code.
I should note, that GLSL is a nice language. But when you cant even run simple GLSL shaders on modern cards, Im not too keen to use it as a simple example (the odds it wont work on many cards is pretty high - including one of my machines, the X700 has problems with various GLSL shaders, but is fine with the ARB asm... as an example :) ).
There are a few other shader languages for OGL too - but few that are as nice as HLSL for instance for wide GPU support, one of the problems with OGL is its shader support - quite horrible even at the best of times. Its a pity because the OGL API is quite easily the best API around for gfx, its just been horribly mangled with extensions.
I agree shader designer apps like ShaderX, RenderMonkey and FX are all great tools for shader design, but few people realise the problems with integration from an app like those - you need to use the same env/temps/param setups as the programs, and this can often conflict with the design of the system that you have created. Shaders are a minefield of problems - this is simply a base example to get ppl running shaders in just over 2 pages of code.
I should note, that GLSL is a nice language. But when you cant even run simple GLSL shaders on modern cards, Im not too keen to use it as a simple example (the odds it wont work on many cards is pretty high - including one of my machines, the X700 has problems with various GLSL shaders, but is fine with the ARB asm... as an example :) ).