Adding texEnv emulation to Immediate mode.
Switch to emcc-style function capitalization.
PR fixes, part 2, take 3.