PixelShaderManager: Disable constant cache (won't work in the non-UBO path of the opengl backend).

ShaderGen: Replace typeid usage with more general code.
This commit is contained in:
NeoBrainX
2013-03-29 20:33:28 +01:00
parent b2517c0308
commit 3c02f227db
6 changed files with 33 additions and 37 deletions

View File

@ -28,7 +28,7 @@
template<class T,class UidType>
void GenerateLightShader(T& object, int index, int litchan_index, const char* lightsName, int coloralpha)
{
#define SetUidField(name, value) if (typeid(T) == typeid(UidType)) { object.GetUidData().name = value; };
#define SetUidField(name, value) if (&object.GetUidData() != NULL) { object.GetUidData().name = value; };
const LitChannel& chan = (litchan_index > 1) ? xfregs.alpha[litchan_index-2] : xfregs.color[litchan_index];
const char* swizzle = "xyzw";
if (coloralpha == 1 ) swizzle = "xyz";