Package javax.media.opengl

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


        // Ensure to sync GL command stream
        if (currentContext != glContext) {
          glContext.makeCurrent();
        }
             gl.glFinish();
             glContext.release();

             if (proxySurface != null) {
               proxySurface.enableUpstreamSurfaceHookLifecycle(false);
             }
View Full Code Here


            gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
                gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, id[0]);
                gl.glBufferData(GL2.GL_ARRAY_BUFFER, glData.capacity()*4, glData, GL2.GL_STATIC_DRAW);
                gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);
            gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);
            gl.glFinish();
           

            // create CLGL buffer
            IntBuffer clData = Buffers.newDirectIntBuffer(9);
            CLGLBuffer<IntBuffer> clBuffer = context.createFromGLBuffer(clData, id[0], glData.capacity()*4, Mem.READ_ONLY);
View Full Code Here

                gl.glBufferData(GL2.GL_ARRAY_BUFFER, BUFFER_SIZE, null, GL2.GL_DYNAMIC_DRAW);
                gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);
            gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);

            pushPerspectiveView(gl);
            gl.glFinish();

            // init OpenCL
            initCL();

            // start rendering thread
View Full Code Here

    public void display(GLAutoDrawable drawable) {

        GL2 gl = drawable.getGL().getGL2();

        // ensure pipeline is clean before doing cl work
        gl.glFinish();

        computeHeightfield();

        gl.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
        gl.glLoadIdentity();
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.