nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
645bf13
)
lib/gamnit: fix `Subtexture::gl_texture` not being set
author
Alexis Laferrière
<alexis.laf@xymus.net>
Thu, 21 Jan 2016 19:31:20 +0000
(14:31 -0500)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Mon, 25 Jan 2016 16:54:32 +0000
(11:54 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/gamnit/textures.nit
patch
|
blob
|
history
diff --git
a/lib/gamnit/textures.nit
b/lib/gamnit/textures.nit
index
e29b71e
..
ce5546e
100644
(file)
--- a/
lib/gamnit/textures.nit
+++ b/
lib/gamnit/textures.nit
@@
-39,7
+39,7
@@
abstract class Texture
var error: nullable Error = null
# OpenGL handle to this texture
- var gl_texture: Int is noinit
+ fun gl_texture: Int do return root.gl_texture
# Prepare a subtexture from this texture
fun subtexture(left, top, width, height: Numeric): GamnitSubtexture
@@
-92,6
+92,8
@@
class GamnitRootTexture
# Has this texture been loaded yet?
var loaded = false
+ redef var gl_texture = -1
+
init do all_root_textures.add self
private fun load_from_pixels(pixels: Pointer, width, height: Int, format: GLPixelFormat)