Package javax.media.opengl

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


    gl.glEnable(GL.GL_NORMALIZE);

    // Coloring

    gl.glColorMaterial(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE);
    gl.glEnable(GL.GL_COLOR_MATERIAL);

    // Remove back-face rendering

    gl.glCullFace(GL.GL_BACK);
    gl.glEnable(GL.GL_CULL_FACE);
View Full Code Here


    gl.glEnable(GL.GL_COLOR_MATERIAL);

    // Remove back-face rendering

    gl.glCullFace(GL.GL_BACK);
    gl.glEnable(GL.GL_CULL_FACE);

    // Initialize ShapesManager

    shapeManager = new ShapeManager(gl, glu, world.turtleShapeList(), world.linkShapeList(),
                                    shapeManager == null ? null : shapeManager.customShapes,
View Full Code Here

      //-> only works with opengl!
        Tools3D.setVSyncing(this, vSync);
      logger.info("Vertical Sync enabled: \"" + vSync + "\"");
       
        if ( MT4jSettings.getInstance().isMultiSampling()){
          gl.glEnable(GL.GL_MULTISAMPLE);
//          gl.glDisable(GL.GL_MULTISAMPLE);
          logger.info("OpenGL multi-sampling enabled.");
        }
        gl.glEnable(GL.GL_LINE_SMOOTH);
//        gl.glDisable(GL.GL_LINE_SMOOTH);
View Full Code Here

        if ( MT4jSettings.getInstance().isMultiSampling()){
          gl.glEnable(GL.GL_MULTISAMPLE);
//          gl.glDisable(GL.GL_MULTISAMPLE);
          logger.info("OpenGL multi-sampling enabled.");
        }
        gl.glEnable(GL.GL_LINE_SMOOTH);
//        gl.glDisable(GL.GL_LINE_SMOOTH);
      }
  }
 
  public void setOpenGLErrorReportingEnabled(boolean reportErros){
View Full Code Here

    public void updateAndDraw(){
      PGraphicsOpenGL pgl = (PGraphicsOpenGL)p.g;         // processings opengl graphics object
      GL gl = pgl.beginGL();                // JOGL's GL object

      gl.glEnable( GL.GL_BLEND );             // enable blending
     
      if(!drawFluid)
        fadeToColor(p, gl, 0, 0, 0, 0.05f);

      gl.glBlendFunc(GL.GL_ONE, GL.GL_ONE)// additive blending (ignore alpha)
View Full Code Here

     
      if(!drawFluid)
        fadeToColor(p, gl, 0, 0, 0, 0.05f);

      gl.glBlendFunc(GL.GL_ONE, GL.GL_ONE)// additive blending (ignore alpha)
      gl.glEnable(GL.GL_LINE_SMOOTH);        // make points round
      gl.glLineWidth(1);


      if(renderUsingVA) {
        for(int i=0; i<maxParticles; i++) {
View Full Code Here

    GL gl = null;
    if (openGl){
      gl= pgl.beginGL();
      gl = pgl.gl;
     
      gl.glEnable(GL.GL_SCISSOR_TEST);
     
      //Project upper Left corner
      upperLeftProjected = Tools3D.projectGL(gl, pgl.glu, upperLeft, upperLeftProjected);
      int scissorStartX = (int) upperLeftProjected.x -0;
      int scissorStartY = (int) upperLeftProjected.y -1;
View Full Code Here

   */
  public static void enableLightningAndAmbient(PApplet pa, float ambientR, float ambientG, float anbientB, float ambientA){
        GL gl = ((PGraphicsOpenGL)pa.g).gl;
       
        //ENABLE LIGHTNING
        gl.glEnable(GL.GL_LIGHTING);
       
        //Set default ambient lightning for all objs
        ToolsLight.setAmbientLight(gl, new float[]{ambientR/255, ambientG/255, anbientB/255, ambientA/255});
       
        //This means that glMaterial will control the polygon's specular and emission colours
View Full Code Here

//        gl.glColorMaterial(GL.GL_FRONT, GL.GL_AMBIENT_AND_DIFFUSE);
        gl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE);
//        gl.glColorMaterial(GL.GL_FRONT, GL.GL_DIFFUSE);
       
        //Enable color material
        gl.glEnable(GL.GL_COLOR_MATERIAL);

        /*
         * GL_RESCALE_NORMAL multiplies the transformed normal by a scale factor.
         * If the original normals are unit length, and the ModelView matrix contains
         * uniform scaling, this multiplication will restore the normals to unit length.
View Full Code Here

         * If the original normals are unit length, and the ModelView matrix contains
         * uniform scaling, this multiplication will restore the normals to unit length.
         * If the ModelView matrix contains nonuniform scaling, GL_NORMALIZE is the
         * preferred solution.
        */
        gl.glEnable(GL.GL_RESCALE_NORMAL);
  }
 
 
  /**
   * Instantiates a new mT light.
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.