mirror of
https://github.com/glest/glest-source.git
synced 2025-02-25 20:22:31 +01:00
- attempt to fix visible quad bug
This commit is contained in:
parent
4015520702
commit
8445a5f616
@ -372,6 +372,7 @@ void Renderer::initGame(const Game *game){
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
quadCache = VisibleQuadContainerCache();
|
||||
quadCache.clearFrustrumData();
|
||||
|
||||
SurfaceData::nextUniqueId = 1;
|
||||
mapSurfaceData.clear();
|
||||
@ -566,6 +567,7 @@ void Renderer::endGame(bool isFinalEnd) {
|
||||
game= NULL;
|
||||
|
||||
quadCache = VisibleQuadContainerCache();
|
||||
quadCache.clearFrustrumData();
|
||||
|
||||
if(this->masterserverMode == true) {
|
||||
return;
|
||||
|
@ -133,18 +133,9 @@ public:
|
||||
visibleScaledCellList.reserve(500);
|
||||
}
|
||||
void clearFrustrumData() {
|
||||
for(unsigned int i = 0; i < frustumData.size(); ++i) {
|
||||
vector<float> &frustumDataInner = frustumData[i];
|
||||
for(unsigned int j = 0; j < frustumDataInner.size(); ++j) {
|
||||
frustumDataInner[j] = 0.0f;
|
||||
}
|
||||
}
|
||||
for(unsigned int i = 0; i < proj.size(); ++i) {
|
||||
proj[i]= 0.0f;
|
||||
}
|
||||
for(unsigned int i = 0; i < modl.size(); ++i) {
|
||||
modl[i]= 0.0f;
|
||||
}
|
||||
frustumData = vector<vector<float> >(6,vector<float>(4,0));
|
||||
proj = vector<float>(16,0);
|
||||
modl = vector<float>(16,0);
|
||||
}
|
||||
int cacheFrame;
|
||||
Quad2i lastVisibleQuad;
|
||||
|
Loading…
x
Reference in New Issue
Block a user