List of usage examples for org.lwjgl.opengl GL11 GL_LIGHT0
int GL_LIGHT0
To view the source code for org.lwjgl.opengl GL11 GL_LIGHT0.
Click Source Link
From source file:game.states.State_SINGLEPLAYER.java
License:Open Source License
@Override protected void Init() { if (CreateNewGame) { CurrentSave = new GameSave(); Worlds = new TileMap[] { new TileMap(), new TileMap(), new TileMap(), new TileMap(), new TileMap(), new TileMap(), new TileMap(), new TileMap(), new TileMap() }; t = Worlds[0];//from www . j a v a 2 s. com CreateGUI(); System.out.println("Loading worlds"); for (int i = 0; i < Worlds.length; i++) { Worlds[i].Load(i == Worlds.length - 1, i == 0, i); CurrentSave.setIntMapData(TileMapGenerator.Map, i); } } GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHT0); GL11.glEnableClientState(GL11.GL_NORMAL_ARRAY); GL11.glEnableClientState(GL11.GL_COLOR_ARRAY); GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity(); GLU.gluPerspective(45.0f, (float) Display.getWidth() / (float) Display.getHeight(), 0.1f, 600.0f); GLU.gluLookAt(0, 20, 50, 0, -2, -100, 0, -1, 0); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); if (CreateNewGame) { player = t.SpawnPlayer(); PlayerGridX = player.getX(); PlayerGridY = player.getY(); PlayerY = 52 - CameraDisplacement * (PlayerGridY - 1); PlayerX = -6 + CameraDisplacement * (PlayerGridX - 1); PlayerZ = 0; SetGUI(); } CreateNewGame = true; GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); }
From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java
License:Open Source License
@Override public void setLightAmbientColor(int light, float[] color) { GL11.glLight(GL11.GL_LIGHT0 + light, GL11.GL_AMBIENT, getDirectBuffer(color)); }
From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java
License:Open Source License
@Override public void setLightDiffuseColor(int light, float[] color) { GL11.glLight(GL11.GL_LIGHT0 + light, GL11.GL_DIFFUSE, getDirectBuffer(color)); }
From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java
License:Open Source License
@Override public void setLightSpecularColor(int light, float[] color) { GL11.glLight(GL11.GL_LIGHT0 + light, GL11.GL_SPECULAR, getDirectBuffer(color)); }
From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java
License:Open Source License
@Override public void setLightConstantAttenuation(int light, float constant) { GL11.glLightf(GL11.GL_LIGHT0 + light, GL11.GL_CONSTANT_ATTENUATION, constant); }
From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java
License:Open Source License
@Override public void setLightLinearAttenuation(int light, float linear) { GL11.glLightf(GL11.GL_LIGHT0 + light, GL11.GL_LINEAR_ATTENUATION, linear); }
From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java
License:Open Source License
@Override public void setLightQuadraticAttenuation(int light, float quadratic) { GL11.glLightf(GL11.GL_LIGHT0 + light, GL11.GL_QUADRATIC_ATTENUATION, quadratic); }
From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java
License:Open Source License
@Override public void setLightDirection(int light, float[] direction) { GL11.glLight(GL11.GL_LIGHT0 + light, GL11.GL_SPOT_DIRECTION, getDirectBuffer(direction)); }
From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java
License:Open Source License
@Override public void setLightPosition(int light, float[] position) { GL11.glLight(GL11.GL_LIGHT0 + light, GL11.GL_POSITION, getDirectBuffer(position)); }
From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java
License:Open Source License
@Override public void setLightSpotCutoff(int light, float cutoff) { GL11.glLightf(GL11.GL_LIGHT0 + light, GL11.GL_SPOT_CUTOFF, cutoff); }