Package javax.media.opengl

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


     */
    protected void endDrawing(DrawContext dc)
    {
        GL2 gl = dc.getGL().getGL2(); // GL initialization checks for GL2 compatibility.
        gl.glBindTexture(GL.GL_TEXTURE_2D, 0);
        gl.glPopAttrib();
    }

    /**
     * Draws the path as an ordered renderable.
     *
 
View Full Code Here


        // Restore matrices
        gl.glPopMatrix();
        gl.glMatrixMode(GL2.GL_MODELVIEW);
        gl.glPopMatrix();
        // Restore attributes
        gl.glPopAttrib();

    }

    @Override
    void executeRasterDepth(Context ctx, float posX, float posY, float posZ,
View Full Code Here

        gl.glEnd();

        // Java 3D always clears the Z-buffer
        gl.glDepthMask(true);
        gl.glClear(GL.GL_DEPTH_BUFFER_BIT);
        gl.glPopAttrib();
    }

    @Override
    boolean initTexturemapping(Context ctx, int texWidth,
            int texHeight, int objectId) {
View Full Code Here

        float[] color = new float[4];

        gl.glPushAttrib(GL2.GL_TRANSFORM_BIT);
        gl.glMatrixMode(GL.GL_TEXTURE);
        gl.glLoadIdentity();
        gl.glPopAttrib();
        gl.glTexEnvfv(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_COLOR, color, 0);
        gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE);
        gl.glHint(GL2.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);

// FIXME: GL_NV_register_combiners
View Full Code Here

        }

        gl.glDepthMask(true);
        gl.glClearColor(r, g, b, jctx.getAlphaClearValue());
        gl.glClear(clearMask);
        gl.glPopAttrib();

    }

    @Override
    void textureFillBackground(Context ctx, float texMinU, float texMaxU, float texMinV, float texMaxV,
View Full Code Here

        // Restore texture Matrix transform
        gl.glPopMatrix();

        gl.glMatrixMode(GL2.GL_MODELVIEW);
        // Restore attributes
        gl.glPopAttrib();

    }

    @Override
    void textureFillRaster(Context ctx, float texMinU, float texMaxU, float texMinV, float texMaxV,
View Full Code Here

            double[] mx = new double[16];
            copyTranspose(transform, mx);
            gl.glLoadMatrixd(mx, 0);
        }

        gl.glPopAttrib();

        // set texture color
        float[] color = new float[4];
        color[0] = textureBlendColorRed;
        color[1] = textureBlendColorGreen;
View Full Code Here

            drawCircle(drawable, circle, circle.getColor());
        }


        // restore the attributes
        gl.glPopAttrib();

    }

    ////////////////////////////////////////////////////////////////
    //  IMPLEMENT THE FUNCTIONS BELOW                     //////////
View Full Code Here

            }
            gl.glEnd();
        }

        // pop current color
        gl.glPopAttrib();
        gl.glDisable(GL.GL_STENCIL_TEST);
    }

    ////////////////////////////////////////////////////////////////
    //  IMPLEMENT THE FUNCTIONS ABOVE                     //////////
View Full Code Here

            gl.glVertex2f(vertex.x, vertex.y);

        gl.glEnd();

        // pop current color
        gl.glPopAttrib();
    }

    private static void drawCircle(final GLAutoDrawable drawable, final Circle circle, final Color color)
    {
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.