update_window_light Subroutine

private subroutine update_window_light(self, root)

The window's light on while no frame of the scene has a light source.

Arguments

Type IntentOptional Attributes Name
type(WindowProxy), intent(inout) :: self
class(ReferenceFrame), intent(in), pointer :: root

the scene's root (may be null)


Calls

proc~~update_window_light~~CallsGraph proc~update_window_light update_window_light interface~vkf_viewer_light_enable vkf_viewer_light_enable proc~update_window_light->interface~vkf_viewer_light_enable proc~has_light_source ReferenceFrame%has_light_source proc~update_window_light->proc~has_light_source proc~has_light_source->proc~has_light_source

Called by

proc~~update_window_light~~CalledByGraph proc~update_window_light update_window_light proc~frame WindowProxy%frame proc~frame->proc~update_window_light proc~resize WindowProxy%resize proc~resize->proc~frame proc~run WindowProxy%run proc~run->proc~frame

Source Code

    subroutine update_window_light(self, root)
        type(WindowProxy), intent(inout) :: self
        class(ReferenceFrame), pointer, intent(in) :: root  !! the scene's root (may be null)
        logical :: on
        on = .true.
        if (associated(root)) on = .not. root%has_light_source()
        if (on .eqv. self%light_on) return
        self%light_on = on
        if (vkf_viewer_light_enable(self%viewer_, merge(1_c_int, 0_c_int, on)) /= 0) &
            write(*, '(a)') 'vkframes: could not switch the window light'
    end subroutine update_window_light