Resolving Compatibility and Render Issues

Published

If your problems are not resolved by the information on this page, then open an issue. Please ensure that you run your program with the the -Dsun.java2d.trace=log,verbose CLI argument and that you include the CLI output in your issue.

Full-Screen Exclusive Mode

In some cases, when the Direct3D render pipeline is used, Full-Screen Exclusive Mode will either show a black or grey screen. This issue is often resolved by one of the following solutions.

Update the JRE

Uninstall all previous versions of the JRE, then install the latest version from here.

Change the Direct3D Rasterizer

This fix mainly applies to machines running Windows.

There are a number of Direct3D rasterizers that you can use. To change the rasterizer, create an Environment Variable called J2D_D3D_RASTERIZER and set it equal to ref, rgb, hal, or tcl.

Both hal and tcl have given good results.

Disable Direct3D & Enable OpenGL

In Java2D, there are three main render pipelines: Java2D, OpenGL, and Direct3D.

To disable Direct3D and enable OpenGL using CLI arguments, run your program with the -Dsun.java2d.d3d=false -Dsun.java2d.opengl=true arguments.

To disable Direct3D and enable OpenGL within your program, add the following lines to the beginning of your main method.

Disable Direct3D & Disable OpenGL

To disable Direct3D and disable OpenGL using CLI arguments, run your program with the -Dsun.java2d.d3d=false -Dsun.java2d.opengl=false arguments.

To disable Direct3D and disable OpenGL within your program, add the following lines to the beginning of your main method.

By disabling both Direct3D and OpenGL, your render performance will severly degrade.

Ensure Only Fullscreen or Windowed Mode is Used

Ensure that you're not running the same Screen in both Fullscreen and Windowed mode at the same time.

Windows UI Scaling

If your machine is running Windows and large font sizes, such as 16pt, 18pt, and 20pt are overly large on your screen, then you may have UI scaling set to a value above 100%.

Adjust Windows' UI Scale

For this solution, you'll want to set your UI scale to 100%. See the following links for examples of how to change the scale value. You must restart your computer after making the change.

Adjust Java2D's UI Scaling

To set Java2D's UI scale value using CLI arguments, run your program with the -Dsun.java2d.uiScale=1.0 argument.