An image handle for texture file file (null if none or unreadable).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Sphere), | intent(in) | :: | self | |||
| character(len=:), | intent(in), | allocatable | :: | file |
found with find_data_file (unallocated or '': none) |
function read_texture(self, file) result(image) type(Sphere), intent(in) :: self character(len=:), allocatable, intent(in) :: file !! found with find_data_file (unallocated or '': none) type(c_ptr) :: image character(len=:), allocatable :: path image = c_null_ptr if (.not. allocated(file)) return if (len(file) == 0) return path = find_data_file(file) if (len(path) > 0) image = vkf_image_read(path, len(path, kind=c_int)) if (.not. c_associated(image)) write(*, '(a)') 'vkframes: Sphere '//self%name()//': could not read texture '//file end function read_texture