Game Development Community

GuiObjectView with cell shading and shape outline

by BBS Games · in Torque Game Engine · 06/22/2006 (4:03 am) · 1 replies

If you need cartoon rendering inside a GuiObjectView controll you have ti install

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10368
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10318

and then in guiObjectView.cc

in function void GuiObjectView::meshObjects::load(S32 index, const char* name, const char* shape, const char* skin, S32 pIndex, S32 pNode, S32 detail)

change

// Copy the shape to mMesh
mMesh[index].mesh = new TSShapeInstance(hShape, true);

to

mMesh[index].mesh = new TSShapeInstance(hShape, true,hShape.getCRC());


in the function void GuiObjectView::renderWorld( const RectI &updateRect )

change

mMeshObjects.mMesh[i].mesh->render();

to

mMeshObjects.mMesh[i].mesh->render(&mCameraMatrix);

recompile...and happy cartoon shading :)