What is ige.useManualRender(true)

All things HTML5 or text based engines, or really any web based engines.
Post Reply
zaquanishak
Posts: 53
Joined: Mon Aug 26, 2013 1:54 am

What is ige.useManualRender(true)

Post by zaquanishak »

Hi coolblake3421,

I see this in ur example 101-isoland, can u explain to me what is this? and why do u need it in ur isoland examples?
Thanks in advance.

Regards,
Zachz
zachz
Programmer
compass-interactive
User avatar
coolbloke1324
Posts: 181
Joined: Mon Jan 23, 2012 5:20 pm

Re: What is ige.useManualRender(true)

Post by coolbloke1324 »

The manualRender() method allows you to tell the engine not to render each tick and instead to render frames "on demand" as your application needs them. The iso-island example is a good use case. Moving objects on screen are rare and only occur when the user is placing an object so the renderer only needs to update when something on screen has changed.

All the best!

Rob
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
zaquanishak
Posts: 53
Joined: Mon Aug 26, 2013 1:54 am

Re: What is ige.useManualRender(true)

Post by zaquanishak »

Thanks coolbloke for the explanation. :)
zachz
Programmer
compass-interactive
zaquanishak
Posts: 53
Joined: Mon Aug 26, 2013 1:54 am

Re: What is ige.useManualRender(true)

Post by zaquanishak »

so what happened if i use manualRender on moving character? how will it effect? I was thinking if i could use manual render on other object around the character, which mean when the character moving from point A to B all object around the character will be manualRender and destroy whenever it doesnt show in the viewport. Is it possible?

Regards,
Zachz
zachz
Programmer
compass-interactive
User avatar
coolbloke1324
Posts: 181
Joined: Mon Jan 23, 2012 5:20 pm

Re: What is ige.useManualRender(true)

Post by coolbloke1324 »

zaquanishak wrote:so what happened if i use manualRender on moving character? how will it effect? I was thinking if i could use manual render on other object around the character, which mean when the character moving from point A to B all object around the character will be manualRender and destroy whenever it doesnt show in the viewport. Is it possible?

Regards,
Zachz
Manual rendering asks the engine to render an entire frame, not just one entity. You cannot render a single entity unless you want to remove all other entities from the frame.

Rendering works by:

1) Sorting all entities by their depth order (what order they will be drawn in)
2) Updating each entity in order by calling the entity's update() method
3) Clearing the canvas completely
3) Drawing each entity in order for each viewport you have in the scenegraph

You cannot render a single entity whilst keeping the rest of the scene intact because you don't have the image data for what is "behind" the entity.
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
Post Reply

Return to “HTML5/Web Engines”