/// <summary>Render display list using supplied environment texture and position.</summary> public static void RenderDisplayList(int displayListId, float x, float y, float z, EnvironmentTextureType texture) { GL.BindTexture(TextureTarget.Texture2D, TextureLoader.GetEnvironmentTexture(texture)); GL.PushMatrix(); GL.Translate(x, y, z); //rotate the face to directly face the player GL.Rotate(MathHelper.RadiansToDegrees(Game.Player.Coords.Direction) - 90, Vector3.UnitY); GL.Rotate(MathHelper.RadiansToDegrees(Game.Player.Coords.Pitch), Vector3.UnitX); GL.CallList(displayListId); GL.PopMatrix(); }
public static int GetEnvironmentTexture(EnvironmentTextureType texture) { return(_environmentTextures[(int)texture]); }
public static int GetEnvironmentTexture(EnvironmentTextureType texture) { return _environmentTextures[(int)texture]; }