Package javax.media.opengl

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


//      gl.glColorMask(true,true,true,true);
//      gl.glEnable (GL.GL_BLEND);
//      gl.glDepthMask(true);//remove..?
     
      //Enable stencilbuffer
      gl.glEnable(GL.GL_STENCIL_TEST);
//        gl.glStencilMask (0x01);
        gl.glStencilOp(GL.GL_KEEP, GL.GL_KEEP, GL.GL_INVERT);
        gl.glStencilFunc (GL.GL_ALWAYS, 0, ~0);
       
        //Stecilfunc bestimmt ob in den stencil geschrieben wird oder nicht
View Full Code Here


//        gl.glDrawArrays(GL.GL_TRIANGLE_FAN, 0, vertBuff.capacity()/3);
//      */
      //////////////////////////////////////
      gl.glDepthMask(true);
     
        gl.glEnable (GL.GL_BLEND);
        gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
      //////////////////////
      // Draw fill    //
        //////////////////////
//        /*
 
View Full Code Here

      //////////////////////
      // Draw fill    //
        //////////////////////
//        /*
      gl.glColorMask(true, true, true, true);
      gl.glEnable (GL.GL_BLEND);
     
        gl.glStencilOp (GL.GL_ZERO, GL.GL_ZERO, GL.GL_ZERO); //org
        gl.glStencilFunc(GL.GL_EQUAL, 0x01, 0x01);
     
//        gl.glStencilOp (GL.GL_KEEP, GL.GL_REPLACE, GL.GL_ZERO);
View Full Code Here

      GLTexture tex = (GLTexture)texture;
      textureTarget = tex.getTextureTarget();
     
      //tells opengl which texture to reference in following calls from now on!
      //the first parameter is eigher GL.GL_TEXTURE_2D or ..1D
      gl.glEnable(textureTarget);
      usedTextureID = tex.getTextureID();
      gl.glBindTexture(textureTarget, tex.getTextureID());
     
      gl.glEnableClientState(GL.GL_TEXTURE_COORD_ARRAY);
      gl.glTexCoordPointer(2, GL.GL_FLOAT, 0, tbuff);
View Full Code Here

    gl.glColorPointer(4, GL.GL_FLOAT, 0, colorBuff);
   
    // START recording display list and DRAW////////////////////
    gl.glNewList(listIDFill, GL.GL_COMPILE);
      if (textureDrawn){
        gl.glEnable(textureTarget); //muss texture in der liste gebinded werden? anscheinend JA!
        gl.glBindTexture(textureTarget, usedTextureID);
      }
     
      //DRAW with drawElements if geometry is indexed, else draw with drawArrays!
      if (geometryInfo.isIndexed()){
View Full Code Here

   
      if (strokeWeight > 0)
        gl.glLineWidth(strokeWeight);
      if (lineStipple != 0){
        gl.glLineStipple(1, lineStipple);
        gl.glEnable(GL.GL_LINE_STIPPLE);
      }
     
      if (indexBuff == null){
        gl.glDrawArrays(GL.GL_LINE_STRIP, 0, vertBuff.capacity()/3);
      }else{
View Full Code Here

    GL gl=((PGraphicsOpenGL)pa.g).beginGL();
    float[] minMax = ToolsGeometry.getMinXYMaxXY(vertexArr);
//    /*
     // Draw to stencil
        gl.glDisable (GL.GL_BLEND);
        gl.glEnable (GL.GL_STENCIL_TEST);
//        gl.glStencilMask (0x01);
        gl.glStencilOp (GL.GL_KEEP, GL.GL_KEEP, GL.GL_INVERT);
        gl.glStencilFunc (GL.GL_ALWAYS, 0, ~0);
        gl.glColorMask (false, false, false, false);
//    */
 
View Full Code Here

        }
       gl.glEnd ();

       //Draw aliased off-pixels to real
        gl.glColorMask (true, true, true, true);
        gl.glEnable (GL.GL_BLEND);
        gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);

//      /*       
        gl.glStencilFunc (GL.GL_EQUAL, 0x00, 0x01);
        gl.glStencilOp (GL.GL_KEEP, GL.GL_KEEP, GL.GL_KEEP);
View Full Code Here

//      /*       
        gl.glStencilFunc (GL.GL_EQUAL, 0x00, 0x01);
        gl.glStencilOp (GL.GL_KEEP, GL.GL_KEEP, GL.GL_KEEP);
       
        //DRAW OUTLINE
       gl.glEnable(GL.GL_LINE_SMOOTH);
       gl.glLineWidth(1.0f);
       gl.glColor4f(0.0f, 0.0f, 0.0f, 1.0f);
        gl.glBegin (GL.GL_LINES);
         for (int i = 0; i < allVertsBezierResolved.length; i++) {
          Vertex vertex = allVertsBezierResolved[i];
View Full Code Here

    g.pushMatrix();

    MTLight aLight = this.getLight();
    if (aLight != null){
      GL gl = ((PGraphicsOpenGL)g).gl;
      gl.glEnable(GL.GL_LIGHTING); //this is expensive
      aLight.enable();
    }

    if (!this.getLocalMatrix().isIdentity())
      this.applyLocalMatrix();
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.