Implement KRNode::RenderInfo

Use KRNode::RenderInfo to reduce render related argument counts and pass KRSurface through render functions.
Refactor render functions to use KRNode::RenderInfo
This commit is contained in:
2022-04-06 01:00:13 -07:00
parent 52c8ec2776
commit 767ba5932b
35 changed files with 319 additions and 282 deletions

View File

@@ -46,6 +46,7 @@
class KRTextureManager;
class KRContext;
class KRSurface;
class KRMaterial : public KRResource {
public:
@@ -82,7 +83,7 @@ public:
bool isTransparent();
const std::string &getName() const;
bool bind(KRCamera *pCamera, std::vector<KRPointLight *> &point_lights, std::vector<KRDirectionalLight *> &directional_lights, std::vector<KRSpotLight *>&spot_lights, const std::vector<KRBone *> &bones, const std::vector<Matrix4> &bind_poses, const KRViewport &viewport, const Matrix4 &matModel, KRTexture *pLightMap, KRNode::RenderPass renderPass, const Vector3 &rim_color, float rim_power, float lod_coverage = 0.0f);
bool bind(const KRNode::RenderInfo& ri, const std::vector<KRBone*>& bones, const std::vector<Matrix4>& bind_poses, const Matrix4& matModel, KRTexture* pLightMap, const Vector3& rim_color, float rim_power, float lod_coverage = 0.0f);
bool needsVertexTangents();