nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2de4410
)
lib/opengles1: add color methods
author
Alexis Laferrière
<alexis.laf@xymus.net>
Tue, 10 Jun 2014 15:28:05 +0000
(11:28 -0400)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Tue, 10 Jun 2014 15:32:11 +0000
(11:32 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/mnit/opengles1.nit
patch
|
blob
|
history
diff --git
a/lib/mnit/opengles1.nit
b/lib/mnit/opengles1.nit
index
a0233fa
..
dd5af2d
100644
(file)
--- a/
lib/mnit/opengles1.nit
+++ b/
lib/mnit/opengles1.nit
@@
-421,6
+421,14
@@
class Opengles1Display
glClearColor( r, g, b, a );
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
`}
+
+ # Set the current color applied to all drawing
+ #
+ # require: r, g, b, a in [0.0 .. 1.0]
+ fun color(r, g, b, a: Float) `{ glColor4f(r, g, b, a); `}
+
+ # Reset the current color to opaque white
+ fun reset_color `{ glColor4f(1.0f, 1.0f, 1.0f, 1.0f); `}
end
extern class Opengles1Image in "C" `{struct mnit_opengles_Texture *`}