Function of LayerNode::updateCompression() (solved)

lrhnfs

05-01-2011 07:17:42

Hello, these days I am studying MyGUI.

I don't know the function of "LayerNode::updateCompression()" in file "MyGUI_LayerNode.cpp"

I only can know the meaning is "Move one target to the end of the vector (supose I was right)"

just like:
in original: vector{ 1 2 3 4 5 }
in target: 2
out result: vector{ 1 3 4 5 2 }

but I don't know what does it mean indeed. I don't think the change I found is useful.
Was it obsolete or ...? Could anyone tell me the answer?
My English is poor, I hope you could know the meaning. Thank you!

Altren

05-01-2011 14:56:47

This function move "empty" (have no vertices to draw) buffers to end of vector. Then whenever new RenderItem created and last buffer is empty RenderItem can use previously allocated buffer from empty render item instead of creating new one.

lrhnfs

06-01-2011 00:58:13

I see. I found it use in "addToRenderItem".
Thank you very much.

Altren

06-01-2011 02:07:52

Why you decided to study MyGUI? I think it might take way too much time to study even main parts of it through source code.
If you need to know something or want to modify something - just ask, I can help you.

lrhnfs

06-01-2011 03:22:19

At the beginning, our company want to develop a new GUI base on the old GUI.
And my assignment is studying MyGUI and update the old GUI.
I found it is not easy, maybe my knowledge is too poor, expecially in 3D programming.

But now, the plan is change.
I just need to modify the Implent of the render and the input, maybe the font too.
It is easier.

Some time I review the MyGUI, and found some puzzle.
just like this.

In MyGUI, I can learn a lot of new knowledge.
Thanks for your help, Thank you and your develop team.

Altren

06-01-2011 14:28:01

But now, the plan is change.
I just need to modify the Implent of the render and the input, maybe the font too.
It is easier.
Well, this mean that you probably not going to modify MyGUI itself :) , because:
- render is not part of MyGUI engine and you are free to modify implementations, that comes with MyGUI for OGRE/DirectX/OpenGL;
- MyGUI have no input, and I wonder what are you talking about, it only use events injected to it from input subsystem (OIS and Win32 input used in demos/tools).

Anyway, if you think that some parts of Gui looks confusing/wrong/slow feel free to tell us, improving it together will be more effective.