OS X Failure - No Keyboard and cannot close

Started by dijumx, August 17, 2011, 13:28:27

Previous topic - Next topic

dijumx

Hi,
First of all I've started a project which runs fine on Linux, and also with windows, but OS X is a pain; here is the main loop:
// init OpenGL here
		GL11.glMatrixMode(GL11.GL_PROJECTION);
		GL11.glLoadIdentity();
		GL11.glOrtho(0, 1280, 720, 0, 1, -1);
		GL11.glMatrixMode(GL11.GL_MODELVIEW);
		
		while (!Display.isCloseRequested() && !quit) {
			
			// Clear the screen and depth buffer
			GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);	
					
			// set the color of the quad (R,G,B,A)
			GL11.glColor4f(0.5f,0.5f,1.0f, 0.25f);
				
			// draw quad
			GL11.glBegin(GL11.GL_QUADS);
			    GL11.glVertex2f(100,100);
			    GL11.glVertex2f(100+200,100);
			    GL11.glVertex2f(100+200,100+200);
			    GL11.glVertex2f(100,100+200);
			GL11.glEnd();
			
			GL11.glColor4f(1.0f, 0.0f, 0.0f, 0.25f);
			
			GL11.glBegin(GL11.GL_QUADS);
		    	GL11.glVertex2f(150,150);
		    	GL11.glVertex2f(150+200,150);
		    	GL11.glVertex2f(150+200,150+200);
		    	GL11.glVertex2f(150,150+200);
		    GL11.glEnd();
		
			// render OpenGL here 
			updateFPS();
			Display.update();
			
			//System.out.println("Escape down?: "+Keyboard.isKeyDown(Keyboard.KEY_ESCAPE));
			while (Keyboard.next()){
				System.out.println("Keyboard Event: "+ Keyboard.getEventKey() + "(State: "+Keyboard.getEventKeyState() +")" );
				if (Keyboard.getEventKey() == Keyboard.KEY_ESCAPE){
					System.out.println("Quit button pressed");
					quit = true;
				}
			}
			
			//System.out.println("Mouse @ " + Mouse.getX() + "," + Mouse.getY());
		}


Now on Linux with debug on, the output is this:
Using Dbus to apply Compiz LFS workaround.
Xrandr extension version 1.3
Using Xrandr for display mode switching
XF86VidMode extension version 2.2
Initial mode: 3600 x 1080 x 24 @77Hz
Pixel format info: r = 8, g = 8, b = 8, a = 0, depth = 24, stencil = 0, sample buffers = 0, samples = 0
Could not locate symbol glVertexWeighthNV
Keyboard Event: 1(State: true)
Quit button pressed
XF86VidMode extension version 2.2

The display closes when I press the escape key, and also when I close with the standard close button in the corner

On windows the output is:
Initial mode: 1920 x 1200 x 32 @59Hz
Could not locate symbol glVertexWeighthNV

The display closes when I press the escape key, and also when I close with the standard close button in the corner

However the OS X (Lion) output is this:
Could not locate symbol glClientAttribDefaultEXT
Could not locate symbol glPushClientAttribDefaultEXT
Could not locate symbol glMatrixLoadfEXT
Could not locate symbol glMatrixLoaddEXT
Could not locate symbol glMatrixMultfEXT
Could not locate symbol glMatrixMultdEXT
Could not locate symbol glMatrixLoadIdentityEXT
Could not locate symbol glMatrixRotatefEXT
Could not locate symbol glMatrixRotatedEXT
Could not locate symbol glMatrixScalefEXT
Could not locate symbol glMatrixScaledEXT
Could not locate symbol glMatrixTranslatefEXT
Could not locate symbol glMatrixTranslatedEXT
Could not locate symbol glMatrixOrthoEXT
Could not locate symbol glMatrixFrustumEXT
Could not locate symbol glMatrixPushEXT
Could not locate symbol glMatrixPopEXT
Could not locate symbol glTextureParameteriEXT
Could not locate symbol glTextureParameterivEXT
Could not locate symbol glTextureParameterfEXT
Could not locate symbol glTextureParameterfvEXT
Could not locate symbol glTextureImage1DEXT
Could not locate symbol glTextureImage2DEXT
Could not locate symbol glTextureSubImage1DEXT
Could not locate symbol glTextureSubImage2DEXT
Could not locate symbol glCopyTextureImage1DEXT
Could not locate symbol glCopyTextureImage2DEXT
Could not locate symbol glCopyTextureSubImage1DEXT
Could not locate symbol glCopyTextureSubImage2DEXT
Could not locate symbol glGetTextureImageEXT
Could not locate symbol glGetTextureParameterfvEXT
Could not locate symbol glGetTextureParameterivEXT
Could not locate symbol glGetTextureLevelParameterfvEXT
Could not locate symbol glGetTextureLevelParameterivEXT
Could not locate symbol glTextureImage3DEXT
Could not locate symbol glTextureSubImage3DEXT
Could not locate symbol glCopyTextureSubImage3DEXT
Could not locate symbol glBindMultiTextureEXT
Could not locate symbol glMultiTexCoordPointerEXT
Could not locate symbol glMultiTexEnvfEXT
Could not locate symbol glMultiTexEnvfvEXT
Could not locate symbol glMultiTexEnviEXT
Could not locate symbol glMultiTexEnvivEXT
Could not locate symbol glMultiTexGendEXT
Could not locate symbol glMultiTexGendvEXT
Could not locate symbol glMultiTexGenfEXT
Could not locate symbol glMultiTexGenfvEXT
Could not locate symbol glMultiTexGeniEXT
Could not locate symbol glMultiTexGenivEXT
Could not locate symbol glGetMultiTexEnvfvEXT
Could not locate symbol glGetMultiTexEnvivEXT
Could not locate symbol glGetMultiTexGendvEXT
Could not locate symbol glGetMultiTexGenfvEXT
Could not locate symbol glGetMultiTexGenivEXT
Could not locate symbol glMultiTexParameteriEXT
Could not locate symbol glMultiTexParameterivEXT
Could not locate symbol glMultiTexParameterfEXT
Could not locate symbol glMultiTexParameterfvEXT
Could not locate symbol glMultiTexImage1DEXT
Could not locate symbol glMultiTexImage2DEXT
Could not locate symbol glMultiTexSubImage1DEXT
Could not locate symbol glMultiTexSubImage2DEXT
Could not locate symbol glCopyMultiTexImage1DEXT
Could not locate symbol glCopyMultiTexImage2DEXT
Could not locate symbol glCopyMultiTexSubImage1DEXT
Could not locate symbol glCopyMultiTexSubImage2DEXT
Could not locate symbol glGetMultiTexImageEXT
Could not locate symbol glGetMultiTexParameterfvEXT
Could not locate symbol glGetMultiTexParameterivEXT
Could not locate symbol glGetMultiTexLevelParameterfvEXT
Could not locate symbol glGetMultiTexLevelParameterivEXT
Could not locate symbol glMultiTexImage3DEXT
Could not locate symbol glMultiTexSubImage3DEXT
Could not locate symbol glCopyMultiTexSubImage3DEXT
Could not locate symbol glEnableClientStateIndexedEXT
Could not locate symbol glDisableClientStateIndexedEXT
Could not locate symbol glGetFloatIndexedvEXT
Could not locate symbol glGetDoubleIndexedvEXT
Could not locate symbol glGetPointerIndexedvEXT
Could not locate symbol glNamedProgramStringEXT
Could not locate symbol glNamedProgramLocalParameter4dEXT
Could not locate symbol glNamedProgramLocalParameter4dvEXT
Could not locate symbol glNamedProgramLocalParameter4fEXT
Could not locate symbol glNamedProgramLocalParameter4fvEXT
Could not locate symbol glGetNamedProgramLocalParameterdvEXT
Could not locate symbol glGetNamedProgramLocalParameterfvEXT
Could not locate symbol glGetNamedProgramivEXT
Could not locate symbol glGetNamedProgramStringEXT
Could not locate symbol glCompressedTextureImage3DEXT
Could not locate symbol glCompressedTextureImage2DEXT
Could not locate symbol glCompressedTextureImage1DEXT
Could not locate symbol glCompressedTextureSubImage3DEXT
Could not locate symbol glCompressedTextureSubImage2DEXT
Could not locate symbol glCompressedTextureSubImage1DEXT
Could not locate symbol glGetCompressedTextureImageEXT
Could not locate symbol glCompressedMultiTexImage3DEXT
Could not locate symbol glCompressedMultiTexImage2DEXT
Could not locate symbol glCompressedMultiTexImage1DEXT
Could not locate symbol glCompressedMultiTexSubImage3DEXT
Could not locate symbol glCompressedMultiTexSubImage2DEXT
Could not locate symbol glCompressedMultiTexSubImage1DEXT
Could not locate symbol glGetCompressedMultiTexImageEXT
Could not locate symbol glMatrixLoadTransposefEXT
Could not locate symbol glMatrixLoadTransposedEXT
Could not locate symbol glMatrixMultTransposefEXT
Could not locate symbol glMatrixMultTransposedEXT
Could not locate symbol glNamedBufferDataEXT
Could not locate symbol glNamedBufferSubDataEXT
Could not locate symbol glMapNamedBufferEXT
Could not locate symbol glUnmapNamedBufferEXT
Could not locate symbol glGetNamedBufferParameterivEXT
Could not locate symbol glGetNamedBufferPointervEXT
Could not locate symbol glGetNamedBufferSubDataEXT
Could not locate symbol glProgramUniform1fEXT
Could not locate symbol glProgramUniform2fEXT
Could not locate symbol glProgramUniform3fEXT
Could not locate symbol glProgramUniform4fEXT
Could not locate symbol glProgramUniform1iEXT
Could not locate symbol glProgramUniform2iEXT
Could not locate symbol glProgramUniform3iEXT
Could not locate symbol glProgramUniform4iEXT
Could not locate symbol glProgramUniform1fvEXT
Could not locate symbol glProgramUniform2fvEXT
Could not locate symbol glProgramUniform3fvEXT
Could not locate symbol glProgramUniform4fvEXT
Could not locate symbol glProgramUniform1ivEXT
Could not locate symbol glProgramUniform2ivEXT
Could not locate symbol glProgramUniform3ivEXT
Could not locate symbol glProgramUniform4ivEXT
Could not locate symbol glProgramUniformMatrix2fvEXT
Could not locate symbol glProgramUniformMatrix3fvEXT
Could not locate symbol glProgramUniformMatrix4fvEXT
Could not locate symbol glProgramUniformMatrix2x3fvEXT
Could not locate symbol glProgramUniformMatrix3x2fvEXT
Could not locate symbol glProgramUniformMatrix2x4fvEXT
Could not locate symbol glProgramUniformMatrix4x2fvEXT
Could not locate symbol glProgramUniformMatrix3x4fvEXT
Could not locate symbol glProgramUniformMatrix4x3fvEXT
Could not locate symbol glTextureParameterIivEXT
Could not locate symbol glTextureParameterIuivEXT
Could not locate symbol glGetTextureParameterIivEXT
Could not locate symbol glGetTextureParameterIuivEXT
Could not locate symbol glMultiTexParameterIivEXT
Could not locate symbol glMultiTexParameterIuivEXT
Could not locate symbol glGetMultiTexParameterIivEXT
Could not locate symbol glGetMultiTexParameterIuivEXT
Could not locate symbol glProgramUniform1uiEXT
Could not locate symbol glProgramUniform2uiEXT
Could not locate symbol glProgramUniform3uiEXT
Could not locate symbol glProgramUniform4uiEXT
Could not locate symbol glProgramUniform1uivEXT
Could not locate symbol glProgramUniform2uivEXT
Could not locate symbol glProgramUniform3uivEXT
Could not locate symbol glProgramUniform4uivEXT
Could not locate symbol glNamedProgramLocalParameters4fvEXT
Could not locate symbol glNamedRenderbufferStorageEXT
Could not locate symbol glGetNamedRenderbufferParameterivEXT
Could not locate symbol glNamedRenderbufferStorageMultisampleEXT
Could not locate symbol glCheckNamedFramebufferStatusEXT
Could not locate symbol glNamedFramebufferTexture1DEXT
Could not locate symbol glNamedFramebufferTexture2DEXT
Could not locate symbol glNamedFramebufferTexture3DEXT
Could not locate symbol glNamedFramebufferRenderbufferEXT
Could not locate symbol glGetNamedFramebufferAttachmentParameterivEXT
Could not locate symbol glGenerateTextureMipmapEXT
Could not locate symbol glGenerateMultiTexMipmapEXT
Could not locate symbol glFramebufferDrawBufferEXT
Could not locate symbol glFramebufferDrawBuffersEXT
Could not locate symbol glFramebufferReadBufferEXT
Could not locate symbol glGetFramebufferParameterivEXT
Could not locate symbol glNamedFramebufferTextureEXT
Could not locate symbol glNamedFramebufferTextureLayerEXT
Could not locate symbol glNamedFramebufferTextureFaceEXT
GL_EXT_direct_state_access was reported as available but an entry point is missing
Could not locate symbol glPrimitiveRestartNV
Could not locate symbol glPrimitiveRestartIndexNV
GL_NV_primitive_restart was reported as available but an entry point is missing

In this case, the program can only be exited from the command line with ctrl+c, the close button doesn't work, nor does the escape button, In fact none of the keys on the keyboard work (tried before with extra code to output the value of any keypress)

This confuses me more when I see other applications which use lwjgl which actually work with the keyboard input on OS X (e.g. minecraft and a chat demo)

Any way this can be fixed easily because of a mistake or is it a bug within lwjgl (as I've seen many bugs due to the new OS X)

P.S. I'm using lwjgl - 2.7.1