Jimmy Engtröm
Jimmy Engtröm

Reputation: 2008

Render texture in 3d space with XNA

I have made an augmented reality app in XNA that displays a 3d model over an SLAR marker (Silverlight Augmented Reality-toolkit). I would like 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.

Upvotes: 1

Views: 3248

Answers (1)

lysergic-acid
lysergic-acid

Reputation: 20050

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.

Upvotes: 4

Related Questions