examples/ starts to become a mess.
So move the simple examples of lib into an `example` subdirectory of the lib.
Signed-off-by: Jean Privat <jean@pryen.org>
20 files changed:
# Basic example of OpenGL ES 2.0 usage from the book OpenGL ES 2.0 Programming Guide.
#
# Code reference:
# Basic example of OpenGL ES 2.0 usage from the book OpenGL ES 2.0 Programming Guide.
#
# Code reference:
-# https://code.google.com/p/opengles-book-samples/source/browse/trunk/LinuxX11/Chapter_2/Hello_Triangle/Hello_Triangle.c
+# https://code.google.com/p/opengles-book-samples/source/browse/trunk/LinuxX11/Chapter_2/Hello_Triangle/Hello_Triangle.c
module opengles2_hello_triangle
import glesv2
module opengles2_hello_triangle
import glesv2
var vertex_shader = new GLVertexShader
assert vertex_shader.is_ok else print "Vertex shader is not ok: {gl_error}"
vertex_shader.source = """
var vertex_shader = new GLVertexShader
assert vertex_shader.is_ok else print "Vertex shader is not ok: {gl_error}"
vertex_shader.source = """
-attribute vec4 vPosition;
-void main()
-{
- gl_Position = vPosition;
+attribute vec4 vPosition;
+void main()
+{
+ gl_Position = vPosition;
} """
vertex_shader.compile
assert vertex_shader.is_compiled else print "Vertex shader compilation failed with: {vertex_shader.info_log} {program.info_log}"
} """
vertex_shader.compile
assert vertex_shader.is_compiled else print "Vertex shader compilation failed with: {vertex_shader.info_log} {program.info_log}"
if msg != "" then print msg
end
end
if msg != "" then print msg
end
end