Daemon
Daemon copied to clipboard
Mutualize SetLightDeluxeMode, SetLightMap, and SetDeluxeMap
Another effort to mutualize code between the non-Material renderer and the Material one.
- Mutualize
SetLightDeluxeMode,SetLightMap, andSetDeluxeMap. - Rewrite
SetRgbaGenasSetRgbGenandSetAlphaGen.
Yeah, merging the code between material/non-material would be great. I've thought about merging the UpdateSurfaceData* functions with Render_* in tr_shade, though it would be a bit cumbersome with a bunch of type casts and if checks scattered around.
Why split rgbgen and alphagen though? Neither of those seems to be used individually.
Why split rgbgen and alphagen though? Neither of those seems to be used individually.
It just made it easier to do something = Func(), less lines of code, and no confusion about things being used while not being set yet. This part is just bikeshedding.
I've thought about merging the
UpdateSurfaceData*functions withRender_*intr_shade
Yeah, I start with easier things, but in the end I want to make them share more code. Next step would be to make them share the Shader permutation selection and binding.
I don't like the file name. I expect MaterialBlahBlah.h to be something only used for the material system
I don't like the file name. I expect MaterialBlahBlah.h to be something only used for the material system
ShadeCommon, with shade like tr_shade.cpp?
(and not ShaderCommon which would be confusing with tr_shader.cpp which is about q3shaders)
ShadeCommon, withshadeliketr_shade.cpp?
All right
ShadeCommon, withshadeliketr_shade.cpp?All right
Done.