Changeset 2663 for GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface
- Timestamp:
- 04/29/08 11:19:06 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
r2662 r2663 101 101 QtGlRendererBuffer::RenderPvs(const ObjectPvs &pvs) 102 102 { 103 #if TEST_PVS_RENDERING 104 105 // Render PVS 106 ObjectPvsIterator it = pvs.GetIterator(); 107 108 Intersectable::NewMail(); 109 mCurrentFrame++; 110 while (it.HasMoreEntries()) 111 { 112 RenderIntersectable(it.Next()); 113 } 114 115 #else 116 117 PreparePvs(pvs); 118 119 int offset = (int)mObjects.size() * 3; 120 char *arrayPtr = mUseVbos ? NULL : (char *)mData; 121 122 glVertexPointer(3, GL_FLOAT, 0, (char *)arrayPtr); 123 glNormalPointer(GL_FLOAT, 0, (char *)arrayPtr + offset * sizeof(Vector3)); 124 glDrawElements(GL_TRIANGLES, mIndexBufferSize, GL_UNSIGNED_INT, mIndices); 125 126 #endif 103 PreparePvs(pvs); 104 105 int offset = (int)mObjects.size() * 3; 106 char *arrayPtr = mUseVbos ? NULL : (char *)mData; 107 108 glVertexPointer(3, GL_FLOAT, 0, (char *)arrayPtr); 109 glNormalPointer(GL_FLOAT, 0, (char *)arrayPtr + offset * sizeof(Vector3)); 110 glDrawElements(GL_TRIANGLES, mIndexBufferSize, GL_UNSIGNED_INT, mIndices); 127 111 } 128 112 … … 136 120 float pErrorPixels = -1.0f; 137 121 138 139 122 mUseFalseColors = false; 140 unsigned int pixelCount ;123 unsigned int pixelCount = 0; 141 124 142 125 … … 153 136 if (!evaluateFilter) 154 137 pvs = viewcell->GetPvs(); 155 else { 156 157 mViewCellsManager->ApplyFilter2(viewcell, 158 false, 159 mViewCellsManager->GetFilterWidth(), 160 pvs); 161 } 138 else 139 mViewCellsManager->ApplyFilter2(viewcell, false, mViewCellsManager->GetFilterWidth(), pvs); 140 162 141 163 142 mUseForcedColors = true; … … 168 147 glColor3f(0,1,0); 169 148 149 glDepthFunc(GL_LESS); 150 glDepthMask(GL_TRUE); 151 glEnable(GL_DEPTH_TEST); 170 152 171 153 glStencilFunc(GL_EQUAL, 0x0, 0x1); … … 182 164 183 165 184 OcclusionQuery *query = mOcclusionQueries[ 0];166 OcclusionQuery *query = mOcclusionQueries[1]; 185 167 186 168 Intersectable::NewMail(); … … 193 175 glDisable(GL_STENCIL_TEST); 194 176 177 195 178 // reenable other state 196 // int wait=0; 197 // while (!query.ResultAvailable()) { 198 // wait++; 199 // } 179 int wait = 0; 180 181 while (0 && !query->ResultAvailable()) 182 { 183 wait ++; 184 } 200 185 201 186 … … 1648 1633 const ViewCellInfoContainer &compareInfo) 1649 1634 { 1650 //cout << "comparing " << viewcells.size() << " view cells to " << compareInfo.size() << " values" << endl;1651 1652 1635 if (viewcells.size() > compareInfo.size()) 1653 1636 { 1654 cerr << "loaded size (" << (int)compareInfo.size() << ") does not fit to view cells size (" << (int)viewcells.size() << ")" << endl; 1637 cerr << "loaded size (" << (int)compareInfo.size() 1638 << ") does not fit to view cells size (" << (int)viewcells.size() << ")" << endl; 1655 1639 return; 1656 1640 }
Note: See TracChangeset
for help on using the changeset viewer.