Java Programming Tutorial #1 (with LWJGL) - Display Setup HD
Welcome to the first Java programming tutorial! Today, we get the display setup for our application using Lightweight Java Game Library (LWJGL). Download LWJGL here: http://bit.ly/1ErlyvY and Slick-Util here: http://slick.ninjacave.com/slick-util/ Get the library only. As part of the display setup, add these lines of code into your Setup() method: glEnable(GL_TEXTURE_2D); glShadeModel(GL_SMOOTH); glDisable(GL_DEPTH_TEST); glDisable(GL_LIGHTING); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClearDepth(1); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glViewport(0, 0, WIDTH, HEIGHT); glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0, WIDTH, HEIGHT, 0, 1, -1); glMatrixMode(GL_MODELVIEW); Also do an import for: import static org.lwjgl.opengl.GL11.*; That will import everything that you need. Leave a like if you found this video helpful. Also subscribe to catch my latest uploads.
Похожие видео
Показать еще