apply_window_light Subroutine

private subroutine apply_window_light(self)

Give the renderer's window light its colors and position (if open).

Arguments

Type IntentOptional Attributes Name
type(WindowProxy), intent(inout) :: self

Calls

proc~~apply_window_light~~CallsGraph proc~apply_window_light apply_window_light interface~vkf_light_set vkf_light_set proc~apply_window_light->interface~vkf_light_set interface~vkf_viewer_light vkf_viewer_light proc~apply_window_light->interface~vkf_viewer_light

Called by

proc~~apply_window_light~~CalledByGraph proc~apply_window_light apply_window_light proc~open WindowProxy%open proc~open->proc~apply_window_light proc~set_light_ambient WindowProxy%set_light_ambient proc~set_light_ambient->proc~apply_window_light proc~set_light_diffuse WindowProxy%set_light_diffuse proc~set_light_diffuse->proc~apply_window_light proc~set_light_position WindowProxy%set_light_position proc~set_light_position->proc~apply_window_light proc~set_light_specular WindowProxy%set_light_specular proc~set_light_specular->proc~apply_window_light

Source Code

    subroutine apply_window_light(self)
        type(WindowProxy), intent(inout) :: self
        type(c_ptr) :: light
        if (.not. c_associated(self%viewer_)) return
        light = vkf_viewer_light(self%viewer_)
        if (.not. c_associated(light)) return
        if (vkf_light_set(light, real(self%light_ambient_, c_float), real(self%light_diffuse_, c_float), &
                          real(self%light_specular_, c_float), real(self%light_position_, c_double)) /= 0) &
            write(*, '(a)') 'vkframes: could not set the window light'
    end subroutine apply_window_light