mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-06 23:14:19 +00:00
Extensions split out into separate classes
This commit is contained in:
parent
8bcedbffe0
commit
583254e4db
170 changed files with 12063 additions and 759 deletions
|
|
@ -168,24 +168,24 @@ public class FullScreenWindowedTest {
|
|||
|
||||
private void render() {
|
||||
//clear background
|
||||
GL.glClear(GL.GL_COLOR_BUFFER_BIT);
|
||||
CoreGL11.glClear(CoreGL11.GL_COLOR_BUFFER_BIT);
|
||||
|
||||
// draw white quad
|
||||
GL.glPushMatrix();
|
||||
CoreGL11.glPushMatrix();
|
||||
{
|
||||
GL.glTranslatef(quadPosition.x, quadPosition.y, 0);
|
||||
GL.glRotatef(angle, 0.0f, 0.0f, 1.0f);
|
||||
GL.glColor3f(1.0f, 1.0f, 1.0f);
|
||||
GL.glBegin(GL.GL_QUADS);
|
||||
CoreGL11.glTranslatef(quadPosition.x, quadPosition.y, 0);
|
||||
CoreGL11.glRotatef(angle, 0.0f, 0.0f, 1.0f);
|
||||
CoreGL11.glColor3f(1.0f, 1.0f, 1.0f);
|
||||
CoreGL11.glBegin(CoreGL11.GL_QUADS);
|
||||
{
|
||||
GL.glVertex2i(-50, -50);
|
||||
GL.glVertex2i(50, -50);
|
||||
GL.glVertex2i(50, 50);
|
||||
GL.glVertex2i(-50, 50);
|
||||
CoreGL11.glVertex2i(-50, -50);
|
||||
CoreGL11.glVertex2i(50, -50);
|
||||
CoreGL11.glVertex2i(50, 50);
|
||||
CoreGL11.glVertex2i(-50, 50);
|
||||
}
|
||||
GL.glEnd();
|
||||
CoreGL11.glEnd();
|
||||
}
|
||||
GL.glPopMatrix();
|
||||
CoreGL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -305,15 +305,15 @@ public class FullScreenWindowedTest {
|
|||
*/
|
||||
private void glInit() {
|
||||
// Go into orthographic projection mode.
|
||||
GL.glMatrixMode(GL.GL_PROJECTION);
|
||||
GL.glLoadIdentity();
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_PROJECTION);
|
||||
CoreGL11.glLoadIdentity();
|
||||
GLU.gluOrtho2D(0, mode.width, 0, mode.height);
|
||||
GL.glMatrixMode(GL.GL_MODELVIEW);
|
||||
GL.glLoadIdentity();
|
||||
GL.glViewport(0, 0, mode.width, mode.height);
|
||||
CoreGL11.glMatrixMode(CoreGL11.GL_MODELVIEW);
|
||||
CoreGL11.glLoadIdentity();
|
||||
CoreGL11.glViewport(0, 0, mode.width, mode.height);
|
||||
|
||||
//set clear color to black
|
||||
GL.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
CoreGL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
//sync frame (only works on windows)
|
||||
Window.setVSyncEnabled(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue