OpenGL ES 3.0
Vertex
-1, 1, 0,
-0.5f, 0, 0,
0,-1, 0,
-1, 0, 0,
0.5f, 0, 0,
1,-1, 0
Vertices are set to size 20
public static final String vertex3 = "#version es \ n" + "uniform mat4 umvpmatrix;\n" + "layout (location = 0) in vec3 aposition;\n " +" layout (location = 1) in vec2 atexcoor;\n " +" out vec2 vtexturecoord;\n " +" void Main () {\ n " +" gl_position = Umvpmatrix * VEC4 (aposition,1); \ n " +" gl_pointsize = 20.0;\n " +" Vtext Urecoord = atexcoor;\n " +"}\n "
public static final String fragment4 = "#version es \ n" + "precision mediump float;\n" + "in Vec2 Vtexturecoor d;\n " +" out vec4 v_color;\n " +" void Main () {\ n " +" vec2 coord = vtexturecoord;\n " +" V_color = Vec4 (1.0,1.0,1.0,0.0); \ n " +"}\n " ;
Gles30.gldrawarrays Drawing shapes
Gl_points, draw some.
Gl_lines Draw line, 2-point connection
Gl_line_loop let the line loop closed
Gl_line_strip draw lines are not closed
Gl_triangles draw a triangle, three points to draw a
Gl_triangle_strip each vertex and 2 other vertex joins to form a triangle
Gl_triangle_fan draw a triangle fan, you can draw shapes like circles
OpenGL ES 3 point, line, triangle drawing form Summary