I made a simple cube, except it doesn't have a back. Or a right side. Or a left side. Or a bottom. Ok, it's not really a cube, but it has a front and top so that I can test depth! Anyways, I placed it so that the front is at position (0, 0, 0) but I can't see it, and I think it has to do with my initGL() function:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| protected void initGL() { int width = display_parent.getWidth(); int height = display_parent.getHeight(); GL11.glEnable(GL11.GL_TEXTURE_2D);' GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // enable alpha blending GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glViewport(0,0,width,height); GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity(); GL11.glOrtho(0, width, 0, height, 0, height); GL11.glMatrixMode(GL11.GL_MODELVIEW); } |
Am I doing something wrong? It's 2:00 AM, so I probably am. Off to bed. Thanks in advance!