Draw an image file as the sky (found with find_data_file); '' for none. Returns false if it cannot be read (the sky is then unchanged).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(SkySphere), | intent(inout) | :: | self | |||
| character(len=*), | intent(in) | :: | file |
image file; '' for none |
logical function set_texture_map(self, file) result(ok) class(SkySphere), intent(inout) :: self character(len=*), intent(in) :: file !! image file; '' for none type(c_ptr) :: image character(len=:), allocatable :: path ok = .true. image = c_null_ptr if (len_trim(file) > 0) then path = find_data_file(file) ok = len(path) > 0 if (ok) image = vkf_image_read(path, len(path, kind=c_int)) ok = c_associated(image) if (.not. ok) then write(*, '(a)') 'vkframes: could not read the sky texture '//trim(file) return end if end if if (c_associated(self%image)) call vkf_image_delete(self%image) self%image = image self%texture_file = trim(file) if (c_associated(self%root)) call make_texture_node(self) end function set_texture_map