nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
206c9d2
)
lib/glesv2: simplify implementation of `GLShader::source=`
author
Alexis Laferrière
<alexis.laf@xymus.net>
Fri, 2 Jan 2015 16:24:46 +0000
(11:24 -0500)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Fri, 2 Jan 2015 21:19:19 +0000
(16:19 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/glesv2/glesv2.nit
patch
|
blob
|
history
diff --git
a/lib/glesv2/glesv2.nit
b/lib/glesv2/glesv2.nit
index
8d5ec6a
..
477fc47
100644
(file)
--- a/
lib/glesv2/glesv2.nit
+++ b/
lib/glesv2/glesv2.nit
@@
-199,9
+199,8
@@
end
# Abstract OpenGL ES shader object, implemented by `GLFragmentShader` and `GLVertexShader`
extern class GLShader `{GLuint`}
# Set the source of the shader
- fun source=(code: String) import String.to_cstring, String.length `{
- GLchar *c_code = String_to_cstring(code);
- glShaderSource(recv, 1, (const GLchar * const*)&c_code, NULL);
+ fun source=(code: NativeString) `{
+ glShaderSource(recv, 1, (GLchar const **)&code, NULL);
`}
# Source of the shader, if available