MCPcopy Create free account
hub / github.com/ddiakopoulos/polymer / pre_draw

Method pre_draw

libraries/lib-engine/src/renderer-pbr.cpp:110–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110void stable_cascaded_shadows::pre_draw()
111{
112 glEnable(GL_DEPTH_TEST);
113
114 glEnable(GL_CULL_FACE);
115 glCullFace(GL_FRONT);
116
117 glBindFramebuffer(GL_FRAMEBUFFER, shadowArrayFramebuffer);
118 glViewport(0, 0, static_cast<GLsizei>(resolution), static_cast<GLsizei>(resolution));
119 glClear(GL_DEPTH_BUFFER_BIT);
120
121 auto & shader = program.get()->get_variant()->shader;
122
123 shader.bind();
124 shader.uniform("u_cascadeViewMatrixArray", uniforms::NUM_CASCADES, viewMatrices);
125 shader.uniform("u_cascadeProjMatrixArray", uniforms::NUM_CASCADES, projMatrices);
126}
127
128void stable_cascaded_shadows::update_shadow_matrix(const float4x4 & shadowModelMatrix)
129{

Callers 3

run_shadow_passMethod · 0.45
on_drawMethod · 0.45
on_drawMethod · 0.45

Calls 4

get_variantMethod · 0.80
getMethod · 0.45
bindMethod · 0.45
uniformMethod · 0.45

Tested by

no test coverage detected