MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / DrawDetailObjectInstances

Method DrawDetailObjectInstances

Source/Objects/envobject.cpp:986–1002  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

984}
985
986void EnvObject::DrawDetailObjectInstances(EnvObject** instance_array, int num_instances, Object::DrawType type) {
987 if (g_debug_runtime_disable_env_object_draw_detail_object_instances) {
988 return;
989 }
990
991 // Note: Should never get called with Object::kDrawDepthOnly. When this comment was written, that was true
992
993 if (!detail_object_surfaces.empty() && type == Object::kFullDraw) {
994 for (int i = 0; i < num_instances; ++i) {
995 EnvObject* obj = instance_array[i];
996 for (DOSList::iterator iter = obj->detail_object_surfaces.begin();
997 iter != obj->detail_object_surfaces.end(); ++iter) {
998 (*iter)->Draw(obj->GetTransform(), DetailObjectSurface::ENVOBJECT, obj->GetDisplayTint(), scenegraph_->sky->GetSpecularCubeMapTexture(), &scenegraph_->light_probe_collection, scenegraph_);
999 }
1000 }
1001 }
1002}
1003
1004void EnvObject::PreDrawCamera(float curr_game_time) {
1005 if (g_debug_runtime_disable_env_object_pre_draw_camera) {

Callers 2

DrawMethod · 0.80
DrawDepthMapMethod · 0.80

Calls 7

GetDisplayTintMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
DrawMethod · 0.45
GetTransformMethod · 0.45

Tested by

no test coverage detected