History

Move Hide/Show local voxels to a dedicated thread so that it doesn't slow performance of voxel packet processing

ZappoMan committed 12 years ago

Commit 76b3bd41 parent 14129cd7 files · +128 −66Browse files

Showing the changes to interface/src/Application.cpp (1 of 7 files). Show all

Unified · Split

interface/src/Application.cpp+4−0
@@ -140,6 +140,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 139 unmodified lines
140#endif140#endif
141 _stopNetworkReceiveThread(false), 141 _stopNetworkReceiveThread(false),
142 _voxelProcessor(),142 _voxelProcessor(),
143 _voxelHideShowThread(&_voxels),
143 _voxelEditSender(this),144 _voxelEditSender(this),
144 _packetCount(0),145 _packetCount(0),
145 _packetsPerSecond(0),146 _packetsPerSecond(0),
@@ -329,6 +330,7 @@ void Application::initializeGL() { · 183 unmodified lines
329 // create thread for parsing of voxel data independent of the main network and rendering threads330 // create thread for parsing of voxel data independent of the main network and rendering threads
330 _voxelProcessor.initialize(_enableProcessVoxelsThread);331 _voxelProcessor.initialize(_enableProcessVoxelsThread);
331 _voxelEditSender.initialize(_enableProcessVoxelsThread);332 _voxelEditSender.initialize(_enableProcessVoxelsThread);
333 _voxelHideShowThread.initialize(_enableProcessVoxelsThread);
332 if (_enableProcessVoxelsThread) {334 if (_enableProcessVoxelsThread) {
333 qDebug("Voxel parsing thread created.\n");335 qDebug("Voxel parsing thread created.\n");
334 }336 }
@@ -1401,6 +1403,7 @@ void Application::terminate() { · 1066 unmodified lines
1401 }1403 }
1402 1404
1403 _voxelProcessor.terminate();1405 _voxelProcessor.terminate();
1406 _voxelHideShowThread.terminate();
1404 _voxelEditSender.terminate();1407 _voxelEditSender.terminate();
1405}1408}
1406 1409
@@ -2249,6 +2252,7 @@ void Application::updateThreads(float deltaTime) { · 842 unmodified lines
2249 // parse voxel packets2252 // parse voxel packets
2250 if (!_enableProcessVoxelsThread) {2253 if (!_enableProcessVoxelsThread) {
2251 _voxelProcessor.threadRoutine();2254 _voxelProcessor.threadRoutine();
2255 _voxelHideShowThread.threadRoutine();
2252 _voxelEditSender.threadRoutine();2256 _voxelEditSender.threadRoutine();
2253 }2257 }
2254}2258}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t