SolidNodeList.sort()

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
walkman
Posts: 4
Joined: Fri Feb 05, 2010 7:47 am

SolidNodeList.sort()

Post by walkman »

my question:

In the ' CSceneManager::drawAll() ----- SolidNodeList.sort()',
I found the heap sort function, compare one DefaultNodeEntry's TextureValue with another's , in fact, compare their SMaterialLayer::ITexture* .

In the other words, it compare two address.
Why? the address, ITexture*, can represent the SolidNode's distance to camera?

tanks.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The nodes are only sorted for less texture changes, not for early z-out.
riveranb
Posts: 28
Joined: Fri Sep 23, 2011 9:37 am

Re: SolidNodeList.sort()

Post by riveranb »

I wanna ask a question about sorting here.
Solid nodes are sorted by texture for less texture changes, but not sorted by material types.
So does texture changing have more overhead time than other opengl state changes?
(like glEnable / glDisable / glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE), ...)
Post Reply