KatsBits Community

Game Editing => idTech Editing Hints & Tips => Topic started by: kat on July 10, 2015, 04:23:03 AM

Title: wglMakeCurrent: setting Processor Affinity
Post by: kat on July 10, 2015, 04:23:03 AM
Problem
Depending on the version of GtkRadiant, problems may occur when running the editor on Windows based computer with multi-core CPU's. Usually the issues tends to manifest as a "wglMakeCurrent" error of some kind [1 (https://www.katsbits.com/smforum/index.php?topic=715.0)] [2 (https://www.katsbits.com/smforum/index.php?topic=713.0)] [3 (https://www.katsbits.com/smforum/index.php?topic=707.0)], in this instance, the result of multi-core CPU's, as an unresponsive or slow Camera or grid view (may also exhibit corrupt display).

Solution
To fix the error, assuming it's not attributed to one of the other reasons wglMakeCurrent issues happen, is to set the number of CPU cores that can be used when running GtkRadiant, essentially throttling the system. To do this start Radiant and once open right-click the "Task Bar" and click "Start Task Manager". A window will appear, "Windows Task Manager", with the "Processes" page/tab active. Find the "GtkRadiant [n]" entry and right-click, select "Set Affinity...". Another panel will open with a list of 'cores' available. Deselect one or more (depending on the number of cores available), click "OK" to set, then close "Windows Task Manager". Once done continue editing as normal.

This may need to be done each time Radiant is started as the setting generally only apply to the application process when its active and in memory. CPU Affinity can also be set from Radiant start-up screen or once the application has fully loaded after the game environment has been set (after the game selection screen).