Ejemplo n.º 1
0
        /// <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();
        }
Ejemplo n.º 2
0
 public static int GetEnvironmentTexture(EnvironmentTextureType texture)
 {
     return(_environmentTextures[(int)texture]);
 }
Ejemplo n.º 3
0
        /// <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();
        }
Ejemplo n.º 4
0
 public static int GetEnvironmentTexture(EnvironmentTextureType texture)
 {
     return _environmentTextures[(int)texture];
 }