Performance optimizations in deferred lighting shaders

Created structures for alpha transparency and occlusion culling
Fixed memory allocation issue in KREngine.mm (pointer to NSDictionary allocated on stack retained and later dereferenced when popped)

--HG--
extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4074
This commit is contained in:
kearwood
2012-08-23 16:55:46 +00:00
parent 6d7e7d9abb
commit 1efbb63ecf
16 changed files with 157 additions and 71 deletions

View File

@@ -27,6 +27,7 @@ KRNode::KRNode(KRContext &context, std::string name) : KRContextObject(context)
}
KRNode::~KRNode() {
m_pContext->notify_sceneGraphDelete(this);
for(std::vector<KRNode *>::iterator itr=m_childNodes.begin(); itr < m_childNodes.end(); ++itr) {
delete *itr;
}
@@ -39,6 +40,7 @@ void KRNode::addChild(KRNode *child) {
child->m_parentNode = this;
m_childNodes.push_back(child);
clearExtents();
m_pContext->notify_sceneGraphCreate(child);
}
tinyxml2::XMLElement *KRNode::saveXML(tinyxml2::XMLNode *parent) {