| 385 | } |
| 386 | |
| 387 | void GetProgramLightBufferBinding(HRenderContext render_context, dmGraphics::HProgram program, bool* out_has_light_buffer, uint16_t* out_set, uint16_t* out_binding) |
| 388 | { |
| 389 | LightBufferBindingCallbackContext cb_ctx; |
| 390 | cb_ctx.m_Context = render_context; |
| 391 | cb_ctx.m_HasLightBuffer = false; |
| 392 | cb_ctx.m_Set = 0; |
| 393 | cb_ctx.m_Binding = 0; |
| 394 | |
| 395 | dmGraphics::IterateProgramResourceBindings(program, dmGraphics::BINDING_FAMILY_UNIFORM_BUFFER, LightBufferBindingCallback, &cb_ctx); |
| 396 | |
| 397 | *out_has_light_buffer = cb_ctx.m_HasLightBuffer; |
| 398 | if (cb_ctx.m_HasLightBuffer) |
| 399 | { |
| 400 | *out_set = cb_ctx.m_Set; |
| 401 | *out_binding = cb_ctx.m_Binding; |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | static void ApplyLightBufferForBinding(HRenderContext render_context, uint16_t light_buffer_set, uint16_t light_buffer_binding) |
| 406 | { |
no test coverage detected