diff options
author | Jacek Antonelli | 2008-08-15 23:45:55 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:55 -0500 |
commit | 9063e60aefe54f7c45aaa8cb24e8998b2c7343ab (patch) | |
tree | 1c8235465701c910a5d76448ddc8eb1f14457ebc /linden/indra/newview/llspatialpartition.cpp | |
parent | Second Life viewer sources 1.20.9 (diff) | |
download | meta-impy-9063e60aefe54f7c45aaa8cb24e8998b2c7343ab.zip meta-impy-9063e60aefe54f7c45aaa8cb24e8998b2c7343ab.tar.gz meta-impy-9063e60aefe54f7c45aaa8cb24e8998b2c7343ab.tar.bz2 meta-impy-9063e60aefe54f7c45aaa8cb24e8998b2c7343ab.tar.xz |
Second Life viewer sources 1.20.10
Diffstat (limited to 'linden/indra/newview/llspatialpartition.cpp')
-rw-r--r-- | linden/indra/newview/llspatialpartition.cpp | 79 |
1 files changed, 1 insertions, 78 deletions
diff --git a/linden/indra/newview/llspatialpartition.cpp b/linden/indra/newview/llspatialpartition.cpp index 250575c..4ec5720 100644 --- a/linden/indra/newview/llspatialpartition.cpp +++ b/linden/indra/newview/llspatialpartition.cpp | |||
@@ -1158,7 +1158,6 @@ void LLSpatialGroup::destroyGL() | |||
1158 | mVertexBuffer = NULL; | 1158 | mVertexBuffer = NULL; |
1159 | mBufferMap.clear(); | 1159 | mBufferMap.clear(); |
1160 | 1160 | ||
1161 | mReflectionMap = NULL; | ||
1162 | clearDrawMap(); | 1161 | clearDrawMap(); |
1163 | 1162 | ||
1164 | if (mOcclusionQuery) | 1163 | if (mOcclusionQuery) |
@@ -1350,7 +1349,6 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, U32 buffer_usage) | |||
1350 | mDepthMask = FALSE; | 1349 | mDepthMask = FALSE; |
1351 | mSlopRatio = 0.25f; | 1350 | mSlopRatio = 0.25f; |
1352 | mRenderByGroup = TRUE; | 1351 | mRenderByGroup = TRUE; |
1353 | mImageEnabled = FALSE; | ||
1354 | mInfiniteFarClip = FALSE; | 1352 | mInfiniteFarClip = FALSE; |
1355 | 1353 | ||
1356 | LLGLNamePool::registerPool(&sQueryPool); | 1354 | LLGLNamePool::registerPool(&sQueryPool); |
@@ -1564,12 +1562,7 @@ public: | |||
1564 | 1562 | ||
1565 | virtual void preprocess(LLSpatialGroup* group) | 1563 | virtual void preprocess(LLSpatialGroup* group) |
1566 | { | 1564 | { |
1567 | if (LLPipeline::sDynamicReflections && | 1565 | |
1568 | group->mOctreeNode->getSize().mdV[0] == 16.0 && | ||
1569 | group->mDistance < 64.f) | ||
1570 | { | ||
1571 | group->mSpatialPartition->markReimage(group); | ||
1572 | } | ||
1573 | } | 1566 | } |
1574 | 1567 | ||
1575 | virtual void processGroup(LLSpatialGroup* group) | 1568 | virtual void processGroup(LLSpatialGroup* group) |
@@ -1837,76 +1830,6 @@ BOOL earlyFail(LLCamera* camera, LLSpatialGroup* group) | |||
1837 | return TRUE; | 1830 | return TRUE; |
1838 | } | 1831 | } |
1839 | 1832 | ||
1840 | void LLSpatialPartition::markReimage(LLSpatialGroup* group) | ||
1841 | { | ||
1842 | if (mImageEnabled && group->isState(LLSpatialGroup::IMAGE_DIRTY)) | ||
1843 | { | ||
1844 | if (!group->isState(LLSpatialGroup::IN_IMAGE_QUEUE)) | ||
1845 | { | ||
1846 | group->setState(LLSpatialGroup::IN_IMAGE_QUEUE); | ||
1847 | mImageQueue.push(group); | ||
1848 | } | ||
1849 | } | ||
1850 | } | ||
1851 | |||
1852 | void LLSpatialPartition::processImagery(LLCamera* camera) | ||
1853 | { | ||
1854 | if (!mImageEnabled) | ||
1855 | { | ||
1856 | return; | ||
1857 | } | ||
1858 | |||
1859 | U32 process_count = 1; | ||
1860 | |||
1861 | S32 pull_count = (S32) mImageQueue.size(); | ||
1862 | |||
1863 | while (process_count > 0 && pull_count > 0 && !mImageQueue.empty()) | ||
1864 | { | ||
1865 | pull_count--; | ||
1866 | LLPointer<LLSpatialGroup> group = mImageQueue.front(); | ||
1867 | mImageQueue.pop(); | ||
1868 | |||
1869 | if (group->isDead()) | ||
1870 | { | ||
1871 | continue; | ||
1872 | } | ||
1873 | |||
1874 | if (group->isState(LLSpatialGroup::GEOM_DIRTY)) | ||
1875 | { //put it back | ||
1876 | mImageQueue.push(group); | ||
1877 | continue; | ||
1878 | } | ||
1879 | |||
1880 | group->clearState(LLSpatialGroup::IN_IMAGE_QUEUE); | ||
1881 | if (LLPipeline::sDynamicReflections) | ||
1882 | { | ||
1883 | process_count--; | ||
1884 | LLVector3 origin = group->mBounds[0]; | ||
1885 | /*LLVector3 at = camera->getOrigin()-origin; | ||
1886 | at.normVec(); | ||
1887 | origin += at* (at * group->mBounds[1]);*/ | ||
1888 | |||
1889 | LLCamera cube_cam; | ||
1890 | cube_cam.setOrigin(origin); | ||
1891 | cube_cam.setFar(64.f); | ||
1892 | |||
1893 | LLPointer<LLCubeMap> cube_map = group->mReflectionMap; | ||
1894 | group->mReflectionMap = NULL; | ||
1895 | if (cube_map.isNull()) | ||
1896 | { | ||
1897 | cube_map = new LLCubeMap(); | ||
1898 | cube_map->initGL(); | ||
1899 | } | ||
1900 | |||
1901 | gPipeline.generateReflectionMap(gPipeline.mCubeBuffer, cube_cam); | ||
1902 | gPipeline.blurReflectionMap(gPipeline.mCubeBuffer, cube_map); | ||
1903 | group->mReflectionMap = cube_map; | ||
1904 | group->setState(LLSpatialGroup::GEOM_DIRTY); | ||
1905 | } | ||
1906 | |||
1907 | group->clearState(LLSpatialGroup::IMAGE_DIRTY); | ||
1908 | } | ||
1909 | } | ||
1910 | 1833 | ||
1911 | void pushVerts(LLDrawInfo* params, U32 mask) | 1834 | void pushVerts(LLDrawInfo* params, U32 mask) |
1912 | { | 1835 | { |