mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-04 14:07:52 +00:00
added opengl init code, previously assumed from Diplay
This commit is contained in:
parent
a15dad6555
commit
2c96ab67ae
2 changed files with 18 additions and 0 deletions
|
|
@ -101,6 +101,16 @@ public class Game {
|
|||
AL.create();
|
||||
|
||||
// TODO: Load in your textures etc here
|
||||
|
||||
// Put the window into orthographic projection mode with 1:1 pixel ratio.
|
||||
// We haven't used GLU here to do this to avoid an unnecessary dependency.
|
||||
GL11.glMatrixMode(GL11.GL_PROJECTION);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glOrtho(0.0, Display.getDisplayMode().getWidth(), 0.0, Display.getDisplayMode().getHeight(), -1.0, 1.0);
|
||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue