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
140140 #endif
141141 _stopNetworkReceiveThread(false),
142142 _voxelProcessor(),
143+ _voxelHideShowThread(&_voxels),
143144 _voxelEditSender(this),
144145 _packetCount(0),
145146 _packetsPerSecond(0),
@@ -329,6 +330,7 @@ void Application::initializeGL() { · 183 unmodified lines
329330 // create thread for parsing of voxel data independent of the main network and rendering threads
330331 _voxelProcessor.initialize(_enableProcessVoxelsThread);
331332 _voxelEditSender.initialize(_enableProcessVoxelsThread);
333+ _voxelHideShowThread.initialize(_enableProcessVoxelsThread);
332334 if (_enableProcessVoxelsThread) {
333335 qDebug("Voxel parsing thread created.\n");
334336 }
@@ -1401,6 +1403,7 @@ void Application::terminate() { · 1066 unmodified lines
14011403 }
14021404
14031405 _voxelProcessor.terminate();
1406+ _voxelHideShowThread.terminate();
14041407 _voxelEditSender.terminate();
14051408 }
14061409
@@ -2249,6 +2252,7 @@ void Application::updateThreads(float deltaTime) { · 842 unmodified lines
22492252 // parse voxel packets
22502253 if (!_enableProcessVoxelsThread) {
22512254 _voxelProcessor.threadRoutine();
2255+ _voxelHideShowThread.threadRoutine();
22522256 _voxelEditSender.threadRoutine();
22532257 }
22542258 }

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