Java Programming Tutorial #1 (with LWJGL) - Display Setup

preview_player
Показать описание
Welcome to the first Java programming tutorial! Today, we get the display setup for our application using Lightweight Java Game Library (LWJGL).

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:

That will import everything that you need.

Leave a like if you found this video helpful. Also subscribe to catch my latest uploads.
Рекомендации по теме
visit shbcf.ru