MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / RenderPolygonModel

Function RenderPolygonModel

model/newstyle.cpp:1127–1156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1125}
1126
1127int RenderPolygonModel(poly_model *pm, uint32_t f_render_sub) {
1128 ASSERT(pm->new_style == 1);
1129 int i = 0;
1130
1131 rend_SetAlphaType(ATF_CONSTANT + ATF_VERTEX);
1132 rend_SetWrapType(WT_WRAP);
1133
1134 FacingPass = 0;
1135 for (i = 0; i < pm->n_models; i++) {
1136 bsp_info *sm = &pm->submodel[i];
1137 if (sm->parent == -1)
1138 RenderSubmodel(pm, sm, f_render_sub);
1139 }
1140
1141 // Now render any facing submodels
1142 if (pm->flags & PMF_FACING) {
1143 // Don't render if we have it set for no glows
1144 FacingPass = 1;
1145 rend_SetOverlayType(OT_NONE);
1146 for (i = 0; i < pm->n_models; i++) {
1147 bsp_info *sm = &pm->submodel[i];
1148 if (sm->parent == -1)
1149 RenderSubmodel(pm, sm, f_render_sub);
1150 }
1151 }
1152
1153 FacingPass = 0;
1154
1155 return 1;
1156}
1157
1158float ComputeDefaultSizeFunc(int handle, float *size_ptr, vector *offset_ptr, bool f_use_all_frames) {
1159 poly_model *pm;

Callers 1

DrawPolygonModelFunction · 0.85

Calls 4

RenderSubmodelFunction · 0.85
rend_SetAlphaTypeFunction · 0.50
rend_SetWrapTypeFunction · 0.50
rend_SetOverlayTypeFunction · 0.50

Tested by

no test coverage detected