Esempio n. 1
0
        public unsafe void Render(RenderMode renderMode)
        {
            _viewport.Clear();

            int numObjects  = Scene.NumObjects;
            int zBufferSize = _width * _height;

            fixed(int *zBufferPtr = &_zBuffer[0])
            {
                for (int i = 0; i < zBufferSize; i++)
                {
                    *(zBufferPtr + i) = int.MinValue;
                }
            }

            for (int i = (_renderAxis ? 0 : 3); i < numObjects; i++)
            {
                RenderModel(Scene[i], renderMode);
            }
        }