About Store Forum Documentation Contact



Post Reply 
The question of mesh->hideAll();
Author Message
Babulesnik Offline
Member

Post: #1
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
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #2
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
Visit this user's website Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #3
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
Find all posts by this user Quote this message in a reply
Ogniok Offline
Member

Post: #4
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
Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #5
RE: The question of mesh->hideAll();
Many thanks to all! issue has been resolved
12-17-2011 08:50 PM
Find all posts by this user Quote this message in a reply
Post Reply