abstract class Texture
# Prepare a texture located at `path` within the `assets` folder
- new (path: Text) do return new GamnitAssetTexture(path.to_s)
+ new (path: Text) do return new TextureAsset(path.to_s)
# Root texture of which `self` is derived
fun root: GamnitRootTexture is abstract
private fun load_from_pixels(pixels: Pointer, width, height: Int, format: GLPixelFormat)
do
- var max_texture_size = glGetIntegerv(gl_MAX_TEXTURE_SIZE)
+ var max_texture_size = glGetIntegerv(gl_MAX_TEXTURE_SIZE, 0)
if width > max_texture_size or height > max_texture_size then
error = new Error("Texture {self} width or height is over the GL_MAX_TEXTURE_SIZE of {max_texture_size}")
return
end
# Texture loaded from the assets folder
-class GamnitAssetTexture
+class TextureAsset
super GamnitRootTexture
# Path to this texture within the `assets` folder