开发者

Render texture in 3d space with XNA

开发者 https://www.devze.com 2023-03-21 13:40 出处:网络
I have made an augmented reality app in XNA that displays a 3d model over an SLAR marker (Silverlight Augmented Reality-toolkit).

I have made an augmented reality app in XNA that displays a 3d model over an SLAR marker (Silverlight Augmented Reality-toolkit). I would li开发者_如何学Pythonke to display an rectangle floating over the 3d model showing a texture, but I'm not sure what object to use. Texture2D doesn't have any 3d space rendering capabilties I know of, is there anything else I can use? The texture I would like to show is generated using the SetData method so it needs to be a Texture2D or an object with simular SetData method.


One solution is to render Textured Quad.

This basically means you're drawing a rectangle in 3d space, and texturing it with whatever texture you'd like.

The link i supplied covers the basics of doing this.

  • Notice that the link involved XNA 4.0 (not sure if there are any changes from previous releases), but the sample also exists for earlier versions of XNA.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号