MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / DrawSortObject

Function DrawSortObject

engine/Poseidon/World/Scene/SceneDraw.cpp:1261–1275  ·  view source on GitHub ↗

Cockpit pass routing — the one policy site. The camera vehicle is queued at its inside-view LOD (World::Draw); only that queue ever selects an object's InsideLOD level, so equality here means "this is the first-person interior" — soldier hands/body, vehicle cockpit. Those draws carry PassKindHint::Cockpit so the descriptor build picks the Cockpit* pass family explicitly instead of inferring it fr

Source from the content-addressed store, hash-verified

1259#endif
1260
1261// Cockpit pass routing — the one policy site. The camera vehicle is
1262// queued at its inside-view LOD (World::Draw); only that queue ever
1263// selects an object's InsideLOD level, so equality here means "this is
1264// the first-person interior" — soldier hands/body, vehicle cockpit.
1265// Those draws carry PassKindHint::Cockpit so the descriptor build picks
1266// the Cockpit* pass family explicitly instead of inferring it from the
1267// shape's NoDropdown faces.
1268static void DrawSortObject(SortObject* oi)
1269{
1270 Object* obj = oi->object;
1271 const bool cockpit =
1272 GWorld && oi->drawLOD != LOD_INVISIBLE && oi->drawLOD == obj->InsideLOD(GWorld->GetCameraType());
1273 if (!cockpit)
1274 {
1275 obj->Draw(oi->drawLOD, oi->orClip, *obj);
1276 return;
1277 }
1278 const render::PassKindHint savedHint = GEngine->GetPassKindHint();

Calls 5

GetCameraTypeMethod · 0.80
GetPassKindHintMethod · 0.80
SetPassKindHintMethod · 0.80
InsideLODMethod · 0.45
DrawMethod · 0.45

Tested by

no test coverage detected