STATE_engine_set_thread_priority

 

 



  Controls the amount of CPU time that the rendering process gets.
  Usually you would like to have the fastest graphics possible
  though sometime when a few application are working in conjunction
  there is need to release some CPU time for the benefit of the others.
   parameters:
  		thread_priority: (For more details please see the win32 function SetThreadPriority() )
  
  			THREAD_PRIORITY_ABOVE_NORMAL 
  				Indicates 1 point above normal priority for the priority class. 
  			THREAD_PRIORITY_BELOW_NORMAL Indicates 
  				1 point below normal priority for the priority class. 
  			THREAD_PRIORITY_HIGHEST 
  				Indicates 2 points above normal priority for the priority class. 
  			THREAD_PRIORITY_IDLE 
  				Indicates a base priority level of 1 for IDLE_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, or HIGH_PRIORITY_CLASS processes, and a base priority level of 16 for REALTIME_PRIORITY_CLASS processes. 
  			THREAD_PRIORITY_LOWEST 
  				Indicates 2 points below normal priority for the priority class. 
  			THREAD_PRIORITY_NORMAL 
  				Indicates normal priority for the priority class. 
  			THREAD_PRIORITY_TIME_CRITICAL 
  				Indicates a base priority level of 15 for IDLE_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, or HIGH_PRIORITY_CLASS processes, and a base priority level of 31 for REALTIME_PRIORITY_CLASS processes. 
  
  		Class priorities: ( For more details please see the win32 function SetPriorityClass() )
  
  			HIGH_PRIORITY_CLASS 
  				Specify this class for a process that performs time-critical tasks that must be executed immediately. The threads of the process preempt the threads of normal or idle priority class processes. An example is the Task List, which must respond quickly when called by the user, regardless of the load on the operating system. Use extreme care when using the high-priority class, because a high-priority class application can use nearly all available CPU time. 
  			IDLE_PRIORITY_CLASS 
  				Specify this class for a process whose threads run only when the system is idle. The threads of the process are preempted by the threads of any process running in a higher priority class. An example is a screen saver. The idle-priority class is inherited by child processes. 
  			NORMAL_PRIORITY_CLASS 
  				Specify this class for a process with no special scheduling needs. 
  			REALTIME_PRIORITY_CLASS 
  				Specify this class for a process that has the highest possible priority. The threads of the process preempt the threads of all other processes, including operating system processes performing important tasks. For example, a real-time process that executes for more than a very brief interval can cause disk caches not to flush or cause the mouse to be unresponsive. 
  Examples:
   A)
  		Setting High priority (The default)
  		STATE_engine_set_thread_priority(THREAD_PRIORITY_HIGHEST, HIGH_PRIORITY_CLASS);
  
   B)
  		Setting the fastest rendering possible
  		STATE_engine_set_thread_priority(THREAD_PRIORITY_TIME_CRITICAL, REALTIME_PRIORITY_CLASS);
  
   For more details please see the win32 functions SetPriorityClass() and SetThreadPriority()

 

 

Go to page 1      Select API

 

Copyright © 2007 3DSTATE Corporation. www.3dstate.com