basic DisplayExample with flickering black and white stripes

Started by lobsterman, June 25, 2013, 13:11:12

Previous topic - Next topic


Hi all, I just installed lwjgl 2.9.0 according to site instructions. i copied the basic DisplayExample Demo from the lwjgl site and get no compile errors. I run the code and i get a window of the requested size but the content is a flickering set of black and white horizontal stripes. No runtime exceptions are reported. when i comment out rendering at line Display.update(); then the flickering stops. anything wrong in the way i followed the instructions or are instructions wrong? i am using eclipse on mac os 10.8.4. any suggestion greatly appreciated. thanks,


found at least a fix for the DisplayExample from NinjaCave. The code needs to clear the screen and depth buffer before rendering. I am including the fixed demo below.

import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;
import org.lwjgl.opengl.GL11;

public class DisplayExample {
   public void start() {
      try {
         Display.setDisplayMode(new DisplayMode(800,600));
      } catch (LWJGLException e) {
      // Clear the screen and depth buffer

      // init OpenGL here
      while (!Display.isCloseRequested()) {

         // render OpenGL here

   public static void main(String[] argv) {
      DisplayExample displayExample = new DisplayExample();