Пример #1
0
 internal override void RequestRenderCommand(CCRenderer renderer)
 {
     if (Action != null)
     {
         renderer.ProcessCustomRenderCommand(this);
     }
 }
Пример #2
0
        internal CCDrawManager(GraphicsDevice device)
        {
            Renderer = new CCRenderer(this);

            depthTest = true;
            allowNonPower2Textures = true;
            hasStencilBuffer       = true;
            currBlend           = CCBlendFunc.AlphaBlend;
            platformDepthFormat = CCDepthFormat.Depth24;
            transform           = Matrix.Identity;

            TmpVertices = new CCRawList <CCV3F_C4B_T2F>();
            matrixStack = new Matrix[100];
            blendStates = new Dictionary <CCBlendFunc, BlendState>();
            effectStack = new Stack <Effect>();

            InitializeRawQuadBuffers();

            rasterizerStatesCache = new List <RasterizerState>();

            hasStencilBuffer = true;

            graphicsDevice = device;
            InitializeGraphicsDevice();
        }
Пример #3
0
        internal CCDrawManager(GraphicsDeviceManager deviceManager, CCSize proposedScreenSize,
                               CCDisplayOrientation supportedOrientations)
        {
            Renderer = new CCRenderer(this);

            graphicsDeviceMgr = deviceManager;

            depthTest = true;
            allowNonPower2Textures = true;
            hasStencilBuffer       = true;
            currBlend           = CCBlendFunc.AlphaBlend;
            platformDepthFormat = CCDepthFormat.Depth24;
            transform           = Matrix.Identity;

            TmpVertices = new CCRawList <CCV3F_C4B_T2F>();
            matrixStack = new Matrix[100];
            blendStates = new Dictionary <CCBlendFunc, BlendState>();
            effectStack = new Stack <Effect>();

            rasterizerStatesCache = new List <RasterizerState>();

            hasStencilBuffer = (deviceManager.PreferredDepthStencilFormat == DepthFormat.Depth24Stencil8);


            if (deviceManager.GraphicsDevice == null)
            {
                initialProposedScreenSizeInPixels           = proposedScreenSize;
                graphicsDeviceMgr.PreferredBackBufferWidth  = (int)initialProposedScreenSizeInPixels.Width;
                graphicsDeviceMgr.PreferredBackBufferHeight = (int)initialProposedScreenSizeInPixels.Height;
                graphicsDeviceMgr.SupportedOrientations     = (DisplayOrientation)supportedOrientations;
                graphicsDeviceMgr.DeviceCreated            += GraphicsDeviceCreated;
                graphicsDeviceMgr.PreparingDeviceSettings  += PreparingDeviceSettings;
            }
        }
Пример #4
0
        public CCRenderTexture()
        {
            beginCommand = new CCCustomCommand(float.MinValue, OnBegin);
            endCommand = new CCCustomCommand(float.MaxValue, OnEnd);

            PixelFormat = CCSurfaceFormat.Color;
            drawManager = CCDrawManager.SharedDrawManager;
            renderer = drawManager.Renderer;
        }
Пример #5
0
        public CCRenderTexture()
        {
            beginCommand = new CCCustomCommand(float.MinValue, OnBegin);
            endCommand   = new CCCustomCommand(float.MaxValue, OnEnd);

            PixelFormat = CCSurfaceFormat.Color;
            drawManager = CCDrawManager.SharedDrawManager;
            renderer    = drawManager.Renderer;
        }
Пример #6
0
 internal override void RequestRenderCommand(CCRenderer renderer)
 {
     if(Action != null)
         renderer.ProcessCustomRenderCommand(this);
 }
 internal override void RequestRenderCommand(CCRenderer renderer)
 {
     renderer.ProcessQuadRenderCommand(this);
 }
Пример #8
0
 internal override void RequestRenderCommand(CCRenderer renderer)
 {
     renderer.ProcessQuadRenderCommand(this);
 }
Пример #9
0
 internal abstract void RequestRenderCommand(CCRenderer renderer);