Examples of glPushMatrix()


Examples of javax.media.opengl.GL.glPushMatrix()

    gl.glGetDoublev(GL.GL_MODELVIEW_MATRIX, camera, 0);
   

    for ( DrawShape shape: toDraw) {
      gl.glPushAttrib(GL.GL_LIGHTING_BIT);
      gl.glPushMatrix();
      gl.glMultMatrixd(shape.getTransform().toArray(), 0);

     
      if (shape.getReferenceBody().deactivated) {
        float ambientLight[] = { 1.5f, 1.5f, 2.0f, 1.0f };
View Full Code Here

Examples of javax.media.opengl.GL.glPushMatrix()

    gl.glMultMatrixd(shadowProjectionMatrix(new Vector3(75,350,-75), new Vector3(0,-20 + 0.0,0), new Vector3(0,-1,0)), 0);
   
    gl.glColor3d(0.85, 0.85, 0.85);
   
    for ( DrawShape shape: toDraw) {
      gl.glPushMatrix();
      gl.glMultMatrixd(shape.getTransform().toArray(), 0);
//      gl.glMultMatrixd(Matrix4.pack(dt.shape.getTransform()),0);


      gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL);
View Full Code Here

Examples of javax.media.opengl.GL.glPushMatrix()

    public void display(GLAutoDrawable glDrawable) {
        GL gl = glDrawable.getGL();

        // Store old matrices
        gl.glMatrixMode(GL.GL_MODELVIEW);
        gl.glPushMatrix();
        gl.glLoadIdentity();
        gl.glMatrixMode(GL.GL_PROJECTION);
        gl.glPushMatrix();
        gl.glLoadIdentity();
View Full Code Here

Examples of javax.media.opengl.GL.glPushMatrix()

        // Store old matrices
        gl.glMatrixMode(GL.GL_MODELVIEW);
        gl.glPushMatrix();
        gl.glLoadIdentity();
        gl.glMatrixMode(GL.GL_PROJECTION);
        gl.glPushMatrix();
        gl.glLoadIdentity();

        gl.glViewport(0, 0, glDrawable.getWidth(), glDrawable.getHeight());

        // Store enabled state and disable lighting, texture mapping and the depth buffer
View Full Code Here

Examples of javax.media.opengl.GL.glPushMatrix()

    public void display(GLAutoDrawable glDrawable) {
        GL gl = glDrawable.getGL();

        // Store old matrices
        gl.glMatrixMode(GL.GL_MODELVIEW);
        gl.glPushMatrix();
        gl.glLoadIdentity();
        gl.glMatrixMode(GL.GL_PROJECTION);
        gl.glPushMatrix();
        gl.glLoadIdentity();
View Full Code Here

Examples of javax.media.opengl.GL.glPushMatrix()

        // Store old matrices
        gl.glMatrixMode(GL.GL_MODELVIEW);
        gl.glPushMatrix();
        gl.glLoadIdentity();
        gl.glMatrixMode(GL.GL_PROJECTION);
        gl.glPushMatrix();
        gl.glLoadIdentity();

        gl.glViewport(0, 0, glDrawable.getWidth(), glDrawable.getHeight());

        // Store enabled state and disable lighting, texture mapping and the depth buffer
View Full Code Here

Examples of javax.media.opengl.GL.glPushMatrix()

    float r1 = 1.0f;
    float r0 = 0.5f;
    float width = .5f;
    float da = .7f;
    rot += 1.0f;
    gl.glPushMatrix();
    gl.glRotatef(30, 1.0f, 0, 0);
    gl.glRotatef(40, 0, 1.0f, 0);
    gl.glRotatef(50, 0, 0, 1.0f);
    gl.glRotatef(rot, 1.0f, 1.0f, 1.0f);
    gl.glMaterialfv(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE, red, 0);
View Full Code Here

Examples of javax.media.opengl.GL.glPushMatrix()

    model.clear();
    PGraphicsOpenGL pgl = ((PGraphicsOpenGL)p.g);
//    GL gl = pgl.beginGL();
    GL gl = pgl.gl;
   
    gl.glPushMatrix();
    gl.glScalef(1, -1, 1);
    gl.glTranslatef(p.width/2, p.height/2, 0);
    gl.glScalef((float)map.sc, (float)map.sc, 1);
    gl.glTranslatef((float)map.tx, (float)map.ty, 0);
    gl.glGetDoublev(GL.GL_MODELVIEW_MATRIX, model);
View Full Code Here

Examples of javax.media.opengl.GL.glPushMatrix()

         
         
          if (NewPt != null){
            PGraphicsOpenGL pgl = ((PGraphicsOpenGL)applet.g);
          GL gl   = pgl.beginGL()
            gl.glPushMatrix();
              gl.glMultMatrixf(shape.getGlobalMatrix().toFloatBuffer());
              NewPt = Tools3D.projectGL(gl, pgl.glu, NewPt, NewPt);
            gl.glPopMatrix();
            pgl.endGL();
           
View Full Code Here

Examples of javax.media.opengl.GL.glPushMatrix()

          Vector3D NewPt = bSphere.getIntersectionLocal(invertedRay);
         
          if (NewPt != null){
            PGraphicsOpenGL pgl = ((PGraphicsOpenGL)applet.g);
          GL gl   = pgl.beginGL()
            gl.glPushMatrix();
              gl.glMultMatrixf(shape.getGlobalMatrix().toFloatBuffer());
              NewPt = Tools3D.projectGL(gl, pgl.glu, NewPt, NewPt);
            gl.glPopMatrix();
            pgl.endGL();
           
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.