Module: Vulkan::Checks

Instance Method Summary collapse

Instance Method Details

#check_result(result) ⇒ Object

Checks whether the result was ok, raising the appropriate error if not.



4
5
6
7
8
9
# File 'lib/vulkan/checks.rb', line 4

def check_result(result)
  case result
  when VK_SUCCESS then return result
  else raise Vulkan::Error::ResultCheckError, result
  end
end