Examples of glShadeModel()


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

    navtime_ctime = new Date();
    navtime_nowtime = new Date();

        gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
        gl.glShadeModel(GL.GL_SMOOTH); // try setting this to GL_FLAT and
                                       // see what happens.
    drawable.addMouseListener(this);
    drawable.addMouseMotionListener(this);
    drawable.addMouseWheelListener(this);
    drawable.addKeyListener(this);
View Full Code Here

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

        // Enable VSync
        gl.setSwapInterval(1);

        // Setup the drawing area and shading mode
        gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
        gl.glShadeModel(GL.GL_SMOOTH); // try setting this to GL_FLAT and see what happens.
    }

    public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
        GL gl = drawable.getGL();
        GLU glu = new GLU();
View Full Code Here

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

       
      // material
        gl.glEnable(GL.GL_COLOR_MATERIAL)// Enable Color Material
    gl.glEnable(GL.GL_ALPHA);
        // shading
        gl.glShadeModel(GL.GL_SMOOTH);
        gl.glEnable(GL.GL_TEXTURE_2D);
        gl.glActiveTexture(GL.GL_TEXTURE0);
        try {
      GetTextures(gl);
      System.out.println("Textures");
View Full Code Here

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

      gl.glEnable(GL.GL_LIGHTING);
    gl.glEnable(GL.GL_BLEND);
      gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
      gl.glEnable(GL.GL_COLOR_MATERIAL);
      gl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE);
      gl.glShadeModel(GL.GL_SMOOTH);

    // Texturing
      gl.glTexEnvf(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_MODULATE);
   
      // View
View Full Code Here

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

      gl.glEnable(GL.GL_LIGHTING);
    gl.glEnable(GL.GL_BLEND);
      gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
      gl.glEnable(GL.GL_COLOR_MATERIAL);
      gl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE);
      gl.glShadeModel(GL.GL_SMOOTH);

      // Anti-Aliasing (Polygon antialiasing causes problems on most graphics cards, don't use it!)
//    FloatBuffer buf = FloatBuffer.allocate(2);
//    gl.glGetFloatv(gl.GL_POINT_SIZE_RANGE, buf);
//    gl.glPointSize(buf.get());
View Full Code Here

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

        "OpenGL graphics: " + gl.glGetString(GL.GL_RENDERER) + "\n"
            + "OpenGL version: " + gl.glGetString(GL.GL_VERSION) + "\n"
            + "OpenGL vendor: " + gl.glGetString(GL.GL_VENDOR)
    );

    gl.glShadeModel(GL.GL_SMOOTH);                     // Enable Smooth Shading
    gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);          // Black Background
    gl.glClearDepth(1.0f);                            // Depth Buffer Setup
    gl.glEnable(GL.GL_DEPTH_TEST);              // Enables Depth Testing
    gl.glDepthFunc(GL.GL_LEQUAL);              // The Type Of Depth Testing To Do
View Full Code Here

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

    GL2 gl = context(ctx).getGL().getGL2();

        if (!enableLight) {
            gl.glColor4f(r, g, b, a);
        }
        gl.glShadeModel(GL2.GL_SMOOTH);
    }

    /**
     *  This native method makes sure that the rendering for this canvas
     *  gets done now.
View Full Code Here

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

        } else {
            cr = red; cg = green; cb = blue;
        }
        gl.glColor4f(cr, cg, cb, alpha);
        if (shadeModel == ColoringAttributes.SHADE_FLAT) {
            gl.glShadeModel(GL2.GL_FLAT);
        } else {
            gl.glShadeModel(GL2.GL_SMOOTH);
        }
    }
View Full Code Here

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

        }
        gl.glColor4f(cr, cg, cb, alpha);
        if (shadeModel == ColoringAttributes.SHADE_FLAT) {
            gl.glShadeModel(GL2.GL_FLAT);
        } else {
            gl.glShadeModel(GL2.GL_SMOOTH);
        }
    }


    // ---------------------------------------------------------------------
View Full Code Here

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

  public void init(GLAutoDrawable drawable) {

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

    // reglages inconnus
    gl.glShadeModel(GL2.GL_SMOOTH);              // Enable Smooth Shading
    gl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f);     // Black Background
    gl.glClearDepth(1.0f);                       // Depth Buffer Setup
    gl.glEnable(GL2.GL_DEPTH_TEST);              // Enables Depth Testing
    gl.glDepthFunc(GL2.GL_LEQUAL);               // The Type Of Depth Testing To Do
    gl.glHint(GL2.GL_PERSPECTIVE_CORRECTION_HINT, GL2.GL_NICEST)// Really Nice Perspective Calculations
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.