I don't see much wrong with the code.
  See comments below.

[EMAIL PROTECTED] wrote:
Okay, so here is my code. Nothing special, I guess . . . .

// Render Frame to volatile image.
      do
      {
        // Check if the viBackbuffer is still valid.
        graphicsConfiguration = this.getGraphicsConfiguration();

  This graphicsConfguration field, are you sure it's not accessed
  (set) from some other thread?

  Also, could you print it out and see if it changes when you move
  the frame from one screen to another.

  Thanks,
    Dmitri

        valCode = viBackbuffer.validate(graphicsConfiguration);
if (valCode == VolatileImage.IMAGE_INCOMPATIBLE)
        {
          System.out.println("Image Incompatible . . . . ");
          System.out.println("Display Panel - Memory: " + 
graphicsConfiguration.getDevice().getAvailableAcceleratedMemory());
          viBackbuffer.flush();
          viBackbuffer = 
graphicsConfiguration.createCompatibleVolatileImage(width, height);
          ImageCapabilities ic = viBackbuffer.getCapabilities();
          if (ic.isAccelerated())
            System.out.println("Backbuffer is ACCELERATED!");
          else
            System.out.println("Backbuffer is NOT accelerated . . . ");
          System.out.println("Display Panel - Memory: " + 
graphicsConfiguration.getDevice().getAvailableAcceleratedMemory());
          // Create graphic2D object from volatile images.
          g2dViBackbuffer = viBackbuffer.createGraphics();
          g2dViBackbuffer.setBackground(Color.white);

          // Clear drawing surface of volatile images with color white.
          g2dViBackbuffer.clearRect(0, 0, width, height);
        }

// my render Stuff

} while (viBackbuffer.contentsLost());
[Message sent by forum member 'kiamur' (kiamur)]

http://forums.java.net/jive/thread.jspa?messageID=290852

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to