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

Function AfterDrawInstancesImpl

Source/Objects/envobject.cpp:965–984  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

963}
964
965void AfterDrawInstancesImpl() {
966 Graphics* graphics = Graphics::Instance();
967 bool attrib_envobj_instancing = g_attrib_envobj_instancing_support && g_attrib_envobj_instancing_enabled;
968
969 graphics->ResetVertexAttribArrays();
970 graphics->BindArrayVBO(0);
971 graphics->BindElementVBO(0);
972
973 int attrib_count = attrib_envobj_instancing ? kAttribIdCountVboInstancing : kAttribIdCountUboInstancing;
974 for (int i = 0; i < attrib_count; ++i) {
975 if (attrib_ids[i] != -1) {
976 glVertexAttribDivisorARB(attrib_ids[i], 0);
977 }
978 }
979
980 if (graphics->use_sample_alpha_to_coverage && last_enable_alpha_to_coverage) {
981 glDisable(GL_SAMPLE_ALPHA_TO_COVERAGE);
982 last_enable_alpha_to_coverage = false;
983 }
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) {

Callers 2

DrawInstancesMethod · 0.85
AfterDrawInstancesMethod · 0.85

Calls 3

BindArrayVBOMethod · 0.80
BindElementVBOMethod · 0.80

Tested by

no test coverage detected