KatsBits Community

wglMakeCurrent: setting Processor Affinity

kat · 1 · 25311

0 Members and 1 Guest are viewing this topic.

Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 3148
    • KatsBits
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] [2] [3], 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).