Load this texture, force reloading it if force

Property definitions

gamnit $ Texture :: load
	# Load this texture, force reloading it if `force`
	fun load(force: nullable Bool) do end
lib/gamnit/textures.nit:71,2--72,38

gamnit $ Subtexture :: load
	redef fun load(force) do root.load(force)
lib/gamnit/textures.nit:347,2--42

gamnit $ CheckerTexture :: load
	redef fun load(force)
	do
		if gl_texture != -1 then return
		load_checker size
		loaded = true
	end
lib/gamnit/textures.nit:122,2--127,4

gamnit $ CustomTexture :: load
	redef fun load(force)
	do
		force = force or else false
		if loaded and not force then return

		if force and glIsTexture(gl_texture) then
			# Was already loaded, free the previous GL name
			glDeleteTextures([gl_texture])
		end
		gl_texture = -1

		# Round down the desired dimension
		var width = width.to_i
		var height = height.to_i
		self.width = width.to_f
		self.height = height.to_f

		load_from_pixels(cpixels.native_array, width, height, gl_RGBA)

		loaded = true
	end
lib/gamnit/textures.nit:194,2--214,4

gamnit $ TextureAsset :: load
	redef fun load(force)
	do
		if loaded and force != true then return

		load_from_platform

		# If no pixel data was loaded, load the pixel default texture
		if gl_texture == -1 then load_checker 32

		loaded = true
	end
lib/gamnit/textures.nit:318,2--328,4