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

Function DrawGlowEffect

model/newstyle.cpp:677–698  ·  view source on GitHub ↗

Draws a glowing cone of light

Source from the content-addressed store, hash-verified

675
676// Draws a glowing cone of light
677void DrawGlowEffect(vector *pos, float r, float g, float b, vector *norm, float size) {
678 if (!UseHardware)
679 return; // No software stuff here!
680
681 if (Polymodel_use_effect && Polymodel_effect.type & PEF_NO_GLOWS)
682 return;
683
684 rend_SetZBufferWriteMask(0);
685 rend_SetAlphaType(AT_SATURATE_TEXTURE);
686 rend_SetAlphaValue(.8 * 255);
687 rend_SetLighting(LS_GOURAUD);
688 rend_SetColorModel(CM_RGB);
689
690 ddgr_color color = GR_RGB(r * 255, g * 255, b * 255);
691 int bm_handle = Fireballs[GRADIENT_BALL_INDEX].bm_handle;
692
693 rend_SetZBias(-size);
694 g3_DrawBitmap(pos, size, (size * bm_h(bm_handle, 0)) / bm_w(bm_handle, 0), bm_handle, color);
695
696 rend_SetZBias(0.0);
697 rend_SetZBufferWriteMask(1);
698}
699
700void RenderSubmodelFacesSorted(poly_model *pm, bsp_info *sm) {
701 int i, t;

Callers 1

RenderSubmodelFunction · 0.85

Calls 10

g3_DrawBitmapFunction · 0.85
bm_hFunction · 0.85
bm_wFunction · 0.85
rend_SetZBufferWriteMaskFunction · 0.50
rend_SetAlphaTypeFunction · 0.50
rend_SetAlphaValueFunction · 0.50
rend_SetLightingFunction · 0.50
rend_SetColorModelFunction · 0.50
GR_RGBFunction · 0.50
rend_SetZBiasFunction · 0.50

Tested by

no test coverage detected