Examples of glClearColor()


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

 
  @Override
  public void init(GLAutoDrawable drawable) {
    canvas.setAutoSwapBufferMode(false);
    GL gl = drawable.getGL();
    gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
    onInit(drawable);
  }

  @Override
  public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
View Full Code Here

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

    public void setBackgroundColor(final ReadOnlyColorRGBA c) {
        final GL gl = GLContext.getCurrentGL();

        _backgroundColor.set(c);
        gl.glClearColor(_backgroundColor.getRed(), _backgroundColor.getGreen(), _backgroundColor.getBlue(),
                _backgroundColor.getAlpha());
    }

    @Override
    public void renderBuckets() {
View Full Code Here

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

  @Override
  public void init(GLAutoDrawable drawable) {
    // TODO Auto-generated method stub
    GL gl = drawable.getGL();
    gl.setSwapInterval(1);
    gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);

    float pos[] = { 5.0f, 5.0f, 10.0f, 0.0f };

    gl.glLightfv(GL.GL_LIGHT0, GL.GL_POSITION, pos, 0);
    gl.glEnable(GL.GL_CULL_FACE);
View Full Code Here

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

            + "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

    gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_FASTEST);
View Full Code Here

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

   * @param drawable
   *          {@inheritDoc}
   */
  public void init(final GLAutoDrawable drawable) {
    final GL gl = drawable.getGL();
    gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
    gl.glLineWidth(DEFAULT_LINE_WIDTH);
  }

  /**
   * {@inheritDoc}
 
View Full Code Here

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

 

  protected void clear(PGraphics graphics){
    if (MT4jSettings.getInstance().isOpenGlMode()){
      GL gl = Tools3D.getGL(mtApplication);
      gl.glClearColor(this.glClearColor.getR(), this.glClearColor.getG(), this.glClearColor.getB(), this.glClearColor.getAlpha());
      gl.glClear(
          GL.GL_COLOR_BUFFER_BIT
          |
          GL.GL_DEPTH_BUFFER_BIT
          );
View Full Code Here

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

        } else {
            gl.glPushAttrib(GL.GL_DEPTH_BUFFER_BIT);
        }

        gl.glDepthMask(true);
        gl.glClearColor(r, g, b, jctx.getAlphaClearValue());
        gl.glClear(clearMask);
        gl.glPopAttrib();

    }
View Full Code Here

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

    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
    gl.setSwapInterval(1);
View Full Code Here

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

    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
    gl.setSwapInterval(1);
View Full Code Here

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

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

            gl.setSwapInterval(0);
            gl.glDisable(GL_DEPTH_TEST);
            gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);

            initView(gl, drawable.getWidth(), drawable.getHeight());

            initPBO(gl);
            drawable.getGL().glFinish();
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.