Babulesnik
Member
|
The question of mesh->hideAll();
The editor of the world I've created a few OBJ_ITEM using a one mesh.
If I choose a container of any index, all objects become invisible.There is an option to solve this problem without creating other meshes?
|
|
12-17-2011 07:32 PM |
|
Dynad
Member
|
RE: The question of mesh->hideAll();
Just don't call the draw function for that object
There is always evil somewhere, you just have to look for it properly.
|
|
12-17-2011 07:43 PM |
|
Babulesnik
Member
|
RE: The question of mesh->hideAll();
(12-17-2011 07:43 PM)Dynad Wrote: Just don't call the draw function for that object
Thanks but I need to show and hide objects from time to time
|
|
12-17-2011 07:56 PM |
|
Ogniok
Member
|
RE: The question of mesh->hideAll();
Why don't extend drawing methods (mainly drawPrepare() and drawShadow() or any others if you use it)?
I use my own code for drawing:
Code:
UInt Tank::drawPrepare()
{
UInt modes;
modes |= RM_PREPARE;
mesh->hideAll().show("rifle").draw(cskel.getBone("rifle").matrix());
mesh->hideAll().show("turret").draw(cskel.getBone("turret").matrix());
mesh->hideAll().show("hull").draw(cskel.matrix());
mesh->showAll();
return modes;
}
void Tank::drawShadow()
{
mesh->hideAll().show("rifle").drawShadow(cskel.getBone("rifle").matrix());
mesh->hideAll().show("turret").drawShadow(cskel.getBone("turret").matrix());
mesh->hideAll().show("hull").drawShadow(cskel.matrix());
mesh->showAll();
}
I also think that there is a variable wantsToBeDraw or something to set if the mesh must be drawn or not.
|
|
12-17-2011 08:13 PM |
|
Babulesnik
Member
|
RE: The question of mesh->hideAll();
Many thanks to all! issue has been resolved
|
|
12-17-2011 08:50 PM |
|