Continued refactoring for multiple light support in forward rendering

--HG--
extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%40158
This commit is contained in:
kearwood
2012-11-16 02:58:23 +00:00
parent 3b352511dc
commit c30c9725e9
25 changed files with 256 additions and 175 deletions

View File

@@ -43,7 +43,7 @@
#import "KRNode.h"
#import "KROctree.h"
class KRInstance;
class KRDirectionalLight;
class KRLight;
using std::vector;
@@ -58,13 +58,13 @@ public:
static KRScene *Load(KRContext &context, const std::string &name, KRDataBlock *data);
KRNode *getRootNode();
KRDirectionalLight *getFirstDirectionalLight();
KRLight *getFirstLight();
#if TARGET_OS_IPHONE
void render(KRCamera *pCamera, const std::set<KRAABB> &visibleBounds, const KRViewport &viewport, KRNode::RenderPass renderPass, std::set<KRAABB> &newVisibleBounds);
void render(KROctreeNode *pOctreeNode, const std::set<KRAABB> &visibleBounds, KRCamera *pCamera, std::stack<KRLight *> lights, const KRViewport &viewport, KRNode::RenderPass renderPass, std::vector<KROctreeNode *> &remainingOctrees, std::vector<KROctreeNode *> &remainingOctreesTestResults, std::vector<KROctreeNode *> &remainingOctreesTestResultsOnly, std::set<KRAABB> &newVisibleBounds, bool bOcclusionResultsPass, bool bOcclusionTestResultsOnly);
void render(KROctreeNode *pOctreeNode, const std::set<KRAABB> &visibleBounds, KRCamera *pCamera, std::vector<KRLight *> lights, const KRViewport &viewport, KRNode::RenderPass renderPass, std::vector<KROctreeNode *> &remainingOctrees, std::vector<KROctreeNode *> &remainingOctreesTestResults, std::vector<KROctreeNode *> &remainingOctreesTestResultsOnly, std::set<KRAABB> &newVisibleBounds, bool bOcclusionResultsPass, bool bOcclusionTestResultsOnly);
#endif
@@ -74,12 +74,13 @@ public:
void notify_sceneGraphModify(KRNode *pNode);
void physicsUpdate(float deltaTime);
void addDefaultLights();
private:
KRDirectionalLight *findFirstDirectionalLight(KRNode &node);
KRLight *findFirstLight(KRNode &node);
KRNode *m_pRootNode;
KRDirectionalLight *m_pFirstDirectionalLight;
KRLight *m_pFirstLight;
std::set<KRNode *> m_newNodes;
std::set<KRNode *> m_modifiedNodes;