Examples of glEnable()


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

  public void init(GLAutoDrawable drawable) {
    // Setup GL
    GL gl = drawable.getGL();
    gl.glEnable (GL.GL_DEPTH_TEST);
    gl.glEnable(GL.GL_CULL_FACE);
    gl.glEnable(GL.GL_LINE_SMOOTH);
      gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
    gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
    //enable vsync
    gl.setSwapInterval(1);
   
View Full Code Here

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

    gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
    //enable vsync
    gl.setSwapInterval(1);
   
    // init some lighting
    gl.glEnable(GL.GL_LIGHTING);
    gl.glEnable(GL.GL_LIGHT0);
    //gl.glShadeModel(GL.GL_FLAT);

    // Create light components
    float ambientLight[] = { 2.0f, 2.0f, 2.0f, 1.0f };
View Full Code Here

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

    //enable vsync
    gl.setSwapInterval(1);
   
    // init some lighting
    gl.glEnable(GL.GL_LIGHTING);
    gl.glEnable(GL.GL_LIGHT0);
    //gl.glShadeModel(GL.GL_FLAT);

    // Create light components
    float ambientLight[] = { 2.0f, 2.0f, 2.0f, 1.0f };
    float diffuseLight[] = { 0.2f, 0.2f, 0.2f, 1.0f };
View Full Code Here

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

    @Override
    boolean decal1stChildSetup(Context ctx) {
        if (VERBOSE) System.err.println("JoglPipeline.decal1stChildSetup()");

        GL gl = context(ctx).getGL();
        gl.glEnable(GL.GL_STENCIL_TEST);
        gl.glClearStencil(0x0);
        gl.glClear(GL.GL_STENCIL_BUFFER_BIT);
        gl.glStencilFunc(GL.GL_ALWAYS, 0x1, 0x1);
        gl.glStencilOp(GL.GL_KEEP, GL.GL_KEEP, GL.GL_REPLACE);
        if (gl.glIsEnabled(GL.GL_DEPTH_TEST))
View Full Code Here

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

        if (VERBOSE) System.err.println("JoglPipeline.decalReset()");

        GL gl = context(ctx).getGL();
        gl.glDisable(GL.GL_STENCIL_TEST);
        if (depthBufferEnable)
            gl.glEnable(GL.GL_DEPTH_TEST);
    }

    // Native method for eye lighting
    @Override
    void ctxUpdateEyeLightingEnable(Context ctx, boolean localEyeLightingEnable) {
View Full Code Here

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

    @Override
    void setBlendFunc(Context ctx, int srcBlendFunction, int dstBlendFunction) {
        if (VERBOSE) System.err.println("JoglPipeline.setBlendFunc()");

        GL gl = context(ctx).getGL();
        gl.glEnable(GL.GL_BLEND);
        gl.glBlendFunc(blendFunctionTable[srcBlendFunction],
                blendFunctionTable[dstBlendFunction]);
    }

    // native method for setting fog enable flag
View Full Code Here

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

        if (VERBOSE) System.err.println("JoglPipeline.setFogEnableFlag()");

        GL gl = context(ctx).getGL();

        if (enable)
            gl.glEnable(GL2.GL_FOG);
        else
            gl.glDisable(GL2.GL_FOG);
    }

    // Setup the full scene antialising in D3D and ogl when GL_ARB_multisamle supported
View Full Code Here

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

        JoglContext ctx = (JoglContext) absCtx;
        GL gl = context(ctx).getGL();
        if (ctx.getHasMultisample() && !VirtualUniverse.mc.implicitAntialiasing) {
            if (enable) {
                gl.glEnable(GL.GL_MULTISAMPLE);
            } else {
                gl.glDisable(GL.GL_MULTISAMPLE);
            }
        }
    }
View Full Code Here

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

        GL gl = context(ctx).getGL();

        for (int i = 0; i < maxLights; i++) {
            if ((enableMask & (1 << i)) != 0) {
                gl.glEnable(GL2.GL_LIGHT0 + i);
            } else {
                gl.glDisable(GL2.GL_LIGHT0 + i);
            }
        }
    }
View Full Code Here

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

        gl.glPushAttrib(attrMask);

        if (!dc.isPickingMode())
        {
            gl.glEnable(GL.GL_BLEND);
            OGLUtil.applyBlending(gl, false);
        }
    }

    /**
 
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.