HighLevelGpuProgram::loadHighLevel() must be public instead of private so i can call this function manually on a worker thread. (directx 9 is not thread safe except for the shader compiler function, fortunately for me)
awhile back paroj suggested I implement this in terms of custom shader parameters for submission to mainline ogre:
(from github)
this solution works great with one problem: i would also like to catch the ogre exception thrown when compilation fails in order to display in my toolset UI. for now i'm considering making a second modification to vanilla ogre to change GpuProgramType::loadFromSource() from protected to public. this function throws the compilation exception which i could use in my toolset. normally this exception is caught higher up in loadHighLevel() so without making loadFromSource() public the only thing i know is that GpuProgram::mCompileError == true when compilation failed.this method is not really meant for public use as it is not properly locked.
Would a simple load() work as well or is createLowLevelImpl problematic?
alternatively use createParameters to trigger loadHighLevel only.
before i investigate implementing the custom shader parameter approach i want to get feedback on the best way to expose or access the error info above. any ideas?
thanks!