DirectX TK - 错误 [英] DirectX TK - Error

查看:81
本文介绍了DirectX TK - 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用DirectX TK绘制背景图像,当我使用模拟器运行它时,它工作得很好,但是当我把它放在WP8上时,它给了我和尴尬的错误,类似于:  D3D11错误:ID3D11Device :: CreateTexture2D:CreateResource:
Texture2D高度或宽度不是2的幂,并指定了多个mip级别。低于10.0的功能级别不支持此功能。

Hi, I've tried to draw a background image with DirectX TK and when I ran it with the emulator it worked perfectly, but when I've put it on WP8 it gave me and awkward error, something like: D3D11 ERROR: ID3D11Device::CreateTexture2D: CreateResource: Texture2D height or width is not a power of 2 and multiple mip levels are specified. This is not supported at feature levels below 10.0.

E_INVALIDARG的内容。 

And something with E_INVALIDARG. 

任何人都可以帮助我吗?

Can anyone help me please?

推荐答案

我找不到此错误的引用。但错误描述实际上告诉您需要采取哪些步骤。您可以将mipmap级别设置为1,这可能是也可能不是一个选项,具体取决于您使用此纹理执行的操作。
或者您可以将高度和宽度设置为2的幂:这意味着如果您要创建480 x 800的纹理,则需要创建484 x 841的纹理。

I'm having trouble finding a reference for this error. But the error description is actually telling you what steps need to be taken. You can either set the mipmap levels to 1, which may or may not be an option depending on what you are doing with this texture. Or you can set height and width to a power of 2: meaning if you were going to create a texture of 480 x 800 you would instead create a texture of 484 x 841.

创建尺寸不大于2维度的纹理的能力是Direct3D的一个相当新的特性。

The ability to create textures not sized to a power of 2 dimension is a fairly new feature of Direct3D.


这篇关于DirectX TK - 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆