Examples of glDrawArrays()


Examples of javax.media.opengl.GL2.glDrawArrays()

            }
            switch (geo_type){
                case GeometryRetained.GEO_TYPE_QUAD_SET : gl.glDrawArrays(GL2.GL_QUADS,     0, vcount); break;
                case GeometryRetained.GEO_TYPE_TRI_SET  : gl.glDrawArrays(GL.GL_TRIANGLES, 0, vcount); break;
                case GeometryRetained.GEO_TYPE_POINT_SET: gl.glDrawArrays(GL.GL_POINTS,    0, vcount); break;
                case GeometryRetained.GEO_TYPE_LINE_SET : gl.glDrawArrays(GL.GL_LINES,     0, vcount); break;
            }
        }

        /* clean up if we turned on normalize */
        if (isNonUniformScale) {
View Full Code Here

Examples of javax.media.opengl.GL2.glDrawArrays()

        gl.glVertexPointer(4, GL2.GL_FLOAT, 0, 0);

//            gl.glBindBuffer(GL2.GL_ELEMENT_ARRAY_BUFFER, glObjects[INDICES]);

        gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
        gl.glDrawArrays(GL2.GL_POINTS, 0, MESH_SIZE * MESH_SIZE);
//            gl.glDrawElements(GL2.GL_TRIANGLES, ib.capacity(), GL2.GL_UNSIGNED_INT, 0);
        gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);

//            gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);

View Full Code Here

Examples of javax.media.opengl.GL2.glDrawArrays()

            }
            gl.glLineWidth(1.0f);

            gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
            gl.glEnableClientState(GL2.GL_COLOR_ARRAY);
            gl.glDrawArrays( GL.GL_LINES, 0, numberOfVertices);
            gl.glDisableClientState(GL2.GL_COLOR_ARRAY);
            gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);
        }
        // Traditional OpenGL
        else {
View Full Code Here

Examples of javax.media.opengl.GL3.glDrawArrays()

                gl3.glUniform1i(textureUnLoc, 0);
               
                gl3.glVertexAttribPointer(0, 4, GL3.GL_FLOAT, false, 0, 0);
                gl3.glVertexAttribPointer(1, 2, GL3.GL_FLOAT, false, 0, 4 * 4 * 4);

                gl3.glDrawArrays(GL3.GL_QUADS, 0, 4);
               
                texture.disable(gl3);
            }
            gl3.glDisableVertexAttribArray(0);
            gl3.glDisableVertexAttribArray(1);
View Full Code Here

Examples of javax.media.opengl.GL3.glDrawArrays()

            colors.write(gl, 0, numElems);

            shaderState.setUniform(gl, "in_Matrix", 4, 4, pmv.glGetMvMatrixf());

            gl.glClear(GL3.GL_COLOR_BUFFER_BIT);
            gl.glDrawArrays(GL3.GL_POINTS, 0, numElems);

            vao.unbind(gl);
            shaderState.unbind(gl);
        } catch (Throwable t) {
            System.err.println("XXXXXX");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.