Constant Viewport refresh?

Next
 From:  Fubax
9039.1 
Is there a way to refresh (have constant above 1 fps), when you don't move the camera?
Maybe some script with infinite loop?

Currently FPS is equal 0 when you don't interact with the viewport.
Constant refresh rate is needed for DirectX injector (ReShade) options menu, which adds Anti-aliasing.

EDITED: 22 Aug 2018 by FUBAX

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9039.2 In reply to 9039.1 
Hi Fubax, sorry no I don't know of a way to do that without having a severe impact on performance.

MoI isn't set up like a game that has a constantly running render loop, MoI only redraws the screen when it needs it.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Fubax
9039.3 In reply to 9039.2 
Hi Michael, I don't mind performance impact. I'am fully aware it will eat a lot of resources. But anyway I need to sometimes enable render loop.
Can you share how-to do so?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9039.4 In reply to 9039.3 
Hi Fubax, well I really don't recommend it but you could try inserting a some script like this inside of CommandBar.htm :

code:
		<script>
			var g_intervalID = null;

			function constantRedrawTimerFunc()
			{
				moi.ui.redrawViewports();
			}

			function startConstantRedraw()
			{
				if ( !g_intervalID )
					g_intervalID = window.setInterval( constantRedrawTimerFunc, 300 ); // call timerfunc every 300 ms.
			}

			function stopConstantRedraw()
			{
				if ( g_intervalID )
				{
					window.clearInterval( g_intervalID );
					g_intervalID = null;
				}
			}
		</script>


Then set up 2 shortcut keys with:

script: moi.ui.commandBar.startConstantRedraw();

script: moi.ui.commandBar.stopConstantRedraw();


The call to moi.ui.redrawViewports(); will not immediately draw the viewports, it will mark them as needing an update and they'll get redrawn when the message queue is next emptied.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Fubax
9039.5 In reply to 9039.4 
Thank you Michael, it works. I only had to use it temporally so the implementation is very nice.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All