MCPcopy Create free account
hub / github.com/OGRECave/ogre / beginAxes

Method beginAxes

OgreMain/src/OgreDefaultDebugDrawer.cpp:44–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 mLines.beginUpdate(0);
43}
44void DefaultDebugDrawer::beginAxes()
45{
46 if (mAxes.getSections().empty())
47 {
48 const char* matName = "Ogre/Debug/AxesMat";
49 auto mat = MaterialManager::getSingleton().getByName(matName, RGN_INTERNAL);
50 if (!mat)
51 {
52 mat = MaterialManager::getSingleton().create(matName, RGN_INTERNAL);
53 Pass* p = mat->getTechnique(0)->getPass(0);
54 p->setLightingEnabled(false);
55 p->setPolygonModeOverrideable(false);
56 p->setVertexColourTracking(TVC_AMBIENT);
57 p->setSceneBlending(SBT_TRANSPARENT_ALPHA);
58 p->setCullingMode(CULL_NONE);
59 p->setDepthWriteEnabled(false);
60 p->setDepthCheckEnabled(false);
61 }
62
63 mAxes.setBufferUsage(HBU_CPU_TO_GPU);
64 mAxes.begin(mat);
65 }
66 else if (mAxes.getCurrentVertexCount() == 0)
67 mAxes.beginUpdate(0);
68}
69void DefaultDebugDrawer::drawWireBox(const AxisAlignedBox& aabb, const ColourValue& colour)
70{
71 beginLines();

Callers

nothing calls this directly

Calls 14

getPassMethod · 0.80
getCurrentVertexCountMethod · 0.80
beginUpdateMethod · 0.80
emptyMethod · 0.45
getByNameMethod · 0.45
createMethod · 0.45
getTechniqueMethod · 0.45
setLightingEnabledMethod · 0.45
setSceneBlendingMethod · 0.45
setCullingModeMethod · 0.45
setDepthWriteEnabledMethod · 0.45

Tested by

no test coverage detected