Exemplo n.º 1
0
        public void ProcessIO()
        {
            // Console commands processing
            var consoleCommands = m_ioManager.GetConsoleUnhandledCommands();
            if (consoleCommands == null)
                return;

            foreach (var command in consoleCommands)
            {
                switch (command)
                {
                    case ConsoleCommands.SHADERS_RECOMPILE:
                        {
                            bool bSuccess = PoolCollector.GetInstance().s_ShaderPool.RecompileAllShaders();
                            if (!bSuccess)
                            {
                                Debug.Log.AddToConsoleStreamLog("Shaders recompilation failed!");
                                Debug.Log.AddToFileStreamLog("Shaders recompilation failed!");
                            }
                            break;
                        }
                    case ConsoleCommands.INFO:
                        {
                            Debug.Log.AddToConsoleStreamLog("Available console commands: ", m_ioManager.GetConsoleCommandsInfo());
                            break;
                        }
                    case ConsoleCommands.UNDEFINED:
                        {
                            Debug.Log.AddToConsoleStreamLog("Unknown command, available console commands are: ", m_ioManager.GetConsoleCommandsInfo());
                            break;
                        }
                }
            }
        }
        private void AddBoundModelToRoot()
        {
            Vector3 LBNCoordinates = Bound.GetLocalSpaceMin();
            Vector3 RTFCoordinates = Bound.GetLocalSpaceMax();

            float[,] renderCoordinates = new float[24, 3];

            renderCoordinates[0, 0] = LBNCoordinates.X; renderCoordinates[0, 1] = LBNCoordinates.Y; renderCoordinates[0, 2] = LBNCoordinates.Z;
            renderCoordinates[1, 0] = RTFCoordinates.X; renderCoordinates[1, 1] = LBNCoordinates.Y; renderCoordinates[1, 2] = LBNCoordinates.Z;
            renderCoordinates[2, 0] = RTFCoordinates.X; renderCoordinates[2, 1] = RTFCoordinates.Y; renderCoordinates[2, 2] = LBNCoordinates.Z;
            renderCoordinates[3, 0] = LBNCoordinates.X; renderCoordinates[3, 1] = RTFCoordinates.Y; renderCoordinates[3, 2] = LBNCoordinates.Z;

            renderCoordinates[4, 0] = RTFCoordinates.X; renderCoordinates[4, 1] = LBNCoordinates.Y; renderCoordinates[4, 2] = LBNCoordinates.Z;
            renderCoordinates[5, 0] = RTFCoordinates.X; renderCoordinates[5, 1] = LBNCoordinates.Y; renderCoordinates[5, 2] = RTFCoordinates.Z;
            renderCoordinates[6, 0] = RTFCoordinates.X; renderCoordinates[6, 1] = RTFCoordinates.Y; renderCoordinates[6, 2] = RTFCoordinates.Z;
            renderCoordinates[7, 0] = RTFCoordinates.X; renderCoordinates[7, 1] = RTFCoordinates.Y; renderCoordinates[7, 2] = LBNCoordinates.Z;

            renderCoordinates[8, 0]  = RTFCoordinates.X; renderCoordinates[8, 1] = LBNCoordinates.Y; renderCoordinates[8, 2] = RTFCoordinates.Z;
            renderCoordinates[9, 0]  = LBNCoordinates.X; renderCoordinates[9, 1] = LBNCoordinates.Y; renderCoordinates[9, 2] = RTFCoordinates.Z;
            renderCoordinates[10, 0] = LBNCoordinates.X; renderCoordinates[10, 1] = RTFCoordinates.Y; renderCoordinates[10, 2] = RTFCoordinates.Z;
            renderCoordinates[11, 0] = RTFCoordinates.X; renderCoordinates[11, 1] = RTFCoordinates.Y; renderCoordinates[11, 2] = RTFCoordinates.Z;

            renderCoordinates[12, 0] = LBNCoordinates.X; renderCoordinates[12, 1] = LBNCoordinates.Y; renderCoordinates[12, 2] = RTFCoordinates.Z;
            renderCoordinates[13, 0] = LBNCoordinates.X; renderCoordinates[13, 1] = LBNCoordinates.Y; renderCoordinates[13, 2] = LBNCoordinates.Z;
            renderCoordinates[14, 0] = LBNCoordinates.X; renderCoordinates[14, 1] = RTFCoordinates.Y; renderCoordinates[14, 2] = LBNCoordinates.Z;
            renderCoordinates[15, 0] = LBNCoordinates.X; renderCoordinates[15, 1] = RTFCoordinates.Y; renderCoordinates[15, 2] = RTFCoordinates.Z;

            renderCoordinates[16, 0] = LBNCoordinates.X; renderCoordinates[16, 1] = LBNCoordinates.Y; renderCoordinates[16, 2] = LBNCoordinates.Z;
            renderCoordinates[17, 0] = RTFCoordinates.X; renderCoordinates[17, 1] = LBNCoordinates.Y; renderCoordinates[17, 2] = LBNCoordinates.Z;
            renderCoordinates[18, 0] = RTFCoordinates.X; renderCoordinates[18, 1] = LBNCoordinates.Y; renderCoordinates[18, 2] = RTFCoordinates.Z;
            renderCoordinates[19, 0] = LBNCoordinates.X; renderCoordinates[19, 1] = LBNCoordinates.Y; renderCoordinates[19, 2] = RTFCoordinates.Z;

            renderCoordinates[20, 0] = LBNCoordinates.X; renderCoordinates[20, 1] = RTFCoordinates.Y; renderCoordinates[20, 2] = LBNCoordinates.Z;
            renderCoordinates[21, 0] = RTFCoordinates.X; renderCoordinates[21, 1] = RTFCoordinates.Y; renderCoordinates[21, 2] = LBNCoordinates.Z;
            renderCoordinates[22, 0] = RTFCoordinates.X; renderCoordinates[22, 1] = RTFCoordinates.Y; renderCoordinates[22, 2] = RTFCoordinates.Z;
            renderCoordinates[23, 0] = LBNCoordinates.X; renderCoordinates[23, 1] = RTFCoordinates.Y; renderCoordinates[23, 2] = RTFCoordinates.Z;

            var vao = new VertexArrayObject();

            var verticesVBO = new VertexBufferObjectTwoDimension <float>(renderCoordinates, BufferTarget.ArrayBuffer, 0, 3, VertexBufferObjectBase.DataCarryFlag.Store);

            vao.AddVBO(verticesVBO);
            vao.BindBuffersToVao();

            skin = new Skin(vao);
            PoolCollector.GetInstance().s_ModelPool.AddModelToRoot(skin, "CollisionBound");
        }
 public Pool GetPool()
 {
     return(PoolCollector.GetInstance().s_ShaderPool);
 }
 public Pool GetPool()
 {
     return(PoolCollector.GetInstance().s_RenderTargetPool);
 }
Exemplo n.º 5
0
 public Pool GetPool()
 {
     return(PoolCollector.GetInstance().s_ModelPool);
 }
 public Pool GetPool()
 {
     return(PoolCollector.GetInstance().s_TexturePool);
 }
 public Pool GetPool()
 {
     return(PoolCollector.GetInstance().s_AnimationPool);
 }