Click here to Skip to main content
Click here to Skip to main content
Articles » Multimedia » DirectX » Games » Downloads
 
Add your own
alternative version

Game Engine

, 20 Nov 2009 CPL
A game engine first prototype
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MTV3D65;

namespace gefx
{
   public  class SkyBox
    {

        

       
        TVLandscape Land;

      
        TVTextureFactory TextureFactory;

      
        public  TVAtmosphere Atmos;

        TVGraphicEffect GraphicFX;

       public  string TSkyTop;
       public string TSkyBottom;
       public string TSkyLeft;
       public string TSkyRight;

       public string TSkyFront;
       public string TSkyBack;



        public SkyBox()
        {
            Atmos = new TVAtmosphere();
            TextureFactory = new TVTextureFactory();
        }

        public void AddSkyBox(string SkyTop, string SkyBottom, string SkyLeft, string SkyRight,
            string SkyFront, string SkyBack, ref TVGlobals Globals)
        {
            TextureFactory.LoadTexture(SkyTop, "SkyTop", -1, -1);
            TextureFactory.LoadTexture(SkyBottom, "SkyBottom", -1, -1);
            TextureFactory.LoadTexture(SkyLeft, "SkyLeft", -1, -1);
            TextureFactory.LoadTexture(SkyRight, "SkyRight", -1, -1);
            TextureFactory.LoadTexture(SkyFront, "SkyFront", -1, -1);
            TextureFactory.LoadTexture(SkyBack, "SkyBack", -1, -1);

            // We set the sky textures.
            Atmos.SkyBox_SetTexture(Globals.GetTex("SkyFront"), Globals.GetTex("SkyBack"), Globals.GetTex("SkyLeft"), Globals.GetTex("SkyRight"), Globals.GetTex("SkyTop"), Globals.GetTex("SkyBottom"));
            Atmos.SkyBox_Enable(true);

            TSkyRight = SkyRight;
            TSkyLeft = SkyLeft;
            TSkyFront = SkyFront;
            TSkyBottom = SkyBottom;
            TSkyBack = SkyBack;
            TSkyRight = SkyRight;
            TSkyTop = SkyTop;

            //Atmos.SkyBox_SetScale(2, 2, 2);


        }

        public void DrawSkyBox()
        {


            Atmos.SkyBox_Render();

        }


    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Common Public License Version 1.0 (CPL)

Share

About the Author

Member 3873633
Software Developer
Croatia Croatia
Programer

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.141223.1 | Last Updated 20 Nov 2009
Article Copyright 2009 by Member 3873633
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid