force
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
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
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