游戏开发论坛

 找回密码
 立即注册
搜索
查看: 5239|回复: 2

XNA Shooter在我的??(nVIDIA7900GT或7300TC)上不能?绦

[复制链接]

414

主题

611

帖子

621

积分

高级会员

Rank: 4

积分
621
发表于 2007-9-16 21:48:00 | 显示全部楼层 |阅读模式
XNA Shooter在我的??(nVIDIA7900GT或7300TC)上不能?绦?但是用nVIDIA 8600GT是可以跑的,???一下?是什?原因?
所?的"不能?绦?quot;是可以?入??蜻x??但是?到??蜷_始,?面就?y了

XNA Shooter的下??站如下:http://xnaprojects.net/

76

主题

1100

帖子

1107

积分

金牌会员

Rank: 6Rank: 6

积分
1107
发表于 2007-9-16 23:58:00 | 显示全部楼层

Re:XNA Shooter在我的??(nVIDIA7900GT或7300TC)上不能?绦

我的也是.好象必须是ATI? x360显示卡是ati的

0

主题

1

帖子

0

积分

新手上路

Rank: 1

积分
0
发表于 2008-1-21 09:27:00 | 显示全部楼层

Re:XNA Shooter在我的??(nVIDIA7900GT或7300TC)上不能?绦

RenderToTexture.cs中

try
            {
                // Create render target of specified size.
                renderTarget = new RenderTarget2D(
                    BaseGame.Device,
                    texWidth, texHeight, 1,
                    format,
                    BaseGame.MultiSampleType, BaseGame.MultiSampleQuality);
                if (format != SurfaceFormat.Color)
                    usesHighPercisionFormat = true;

                // Unsupported on Xbox360, will crash with InvalidOperationException
                //obs: #if !XBOX360
                // Create z buffer surface for shadow map render targets
                // if they don't fit in our current resolution.
                if (sizeType == SizeType.FullScreenWithZBuffer ||
                    sizeType == SizeType.HalfScreenWithZBuffer ||
                    sizeType == SizeType.ShadowMap &&
                    (texWidth > BaseGame.Width ||
                    texHeight > BaseGame.Height))
                {
                    zBufferSurface =
                        new DepthStencilBuffer(
                        BaseGame.Device,
                        texWidth, texHeight,
                        // Lets use the same stuff as the back buffer.
                        BaseGame.BackBufferDepthFormat,
                        // Don't use multisampling, render target does not support that.
                        //obs: MultiSampleType.None, 0);
                        BaseGame.MultiSampleType, BaseGame.MultiSampleQuality);
                } // if
                //#endif
                loaded = true;
            } // try
            catch (InvalidOperationException ex)
            {
                renderTarget = new RenderTarget2D(
                    BaseGame.Device,
                    texWidth, texHeight, 1,
                    format);
            }
            catch (Exception ex)
            {
                // Everything failed, make this unuseable.
                Log.Write("Creating RenderToTexture failed: " + ex.ToString());
                renderTarget = null;
                internalXnaTexture = null;
                loaded = false;
            } // catch

原来的Source Code里没有具体捕捉InvalidOperationException这个错误,在我的机器上运行也是这样。。。请加入这部分的代码,当捕捉到InvalidOperationException时,继续创建renderTarget,不过请注意,使用只有5个参数的那个构造函数。。。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-12-19 23:39

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表