cant just drop the code in you need to replace the functions with the same names

but copying the modified files will also work. My guess is the error you got was that the function was allready declared.
ill probably drop the old code for dual pass stencil as it doesnt seem to give any huge improvements and just go with mh's version (need a below geforce 7000 card anyway to not have gl2 and a few of the opengl2 functions where actually supported by even older ones like the 6600).
Depth clamp still seems to be a bit flaky with mh's version (shadows dissapear at a certain range) not sure if depth clamp is even possible with his version it might be part of the function allready hmm ?.
Productivity is a state of mind.