DarkRadiant: master 83627e5e
Author | Committer | Branch | Timestamp | Parent |
---|---|---|---|---|
orbweaver | orbweaver | master | 19.08.2020 19:54 | master 4fcd7a4d |
Changeset | Split the LightList interface One confusing aspect of the LightList interface was that the same interface was used for two different purposes: (1) calculating lights which intersect a LitObject and passing these lights to LitObject::insertLight, and (2) storing the resulting list of lights (possibly in a different LightList instance within the same object) and passing these back to the RenderableCollector at render time. In order to clarify these different roles, and avoid the need for empty placeholder methods, the interface has now been split. LightSources is a simple container which exposes the forEachLight() method, while LightList now exposes the methods relating to calculating light intersections. The RenderableCollector and Shader interfaces, which do not care about calculating light intersections, accept a LightSources pointer instead of the full LightList interface. Since some renderable objects do not make use of insertLight() but simply store and return the LightList as-is, the LightList interface inherits from LightSources so it can still be passed to RenderableCollector in the existing way. |
|||
mod - include/irender.h | Diff File | |||
mod - include/irenderable.h | Diff File | |||
mod - libs/render/SimpleFrontendRenderer.h | Diff File | |||
mod - libs/render/VectorLightList.h | Diff File | |||
mod - radiant/brush/Face.cpp | Diff File | |||
mod - radiant/brush/Face.h | Diff File | |||
mod - radiant/camera/CamRenderer.cpp | Diff File | |||
mod - radiant/camera/CamRenderer.h | Diff File | |||
mod - radiant/modelfile/PicoModelNode.cpp | Diff File | |||
mod - radiant/modelfile/PicoModelNode.h | Diff File | |||
mod - radiant/modelfile/RenderablePicoModel.cpp | Diff File | |||
mod - radiant/modelfile/RenderablePicoModel.h | Diff File | |||
mod - radiant/render/backend/OpenGLShader.cpp | Diff File | |||
mod - radiant/render/backend/OpenGLShader.h | Diff File | |||
mod - radiant/xyview/XYRenderer.h | Diff File |