1
\$\begingroup\$

I'm looking for how to make 3D gauge on Windows Phone 7, that's mean a 3D object (a watch for example) with a basic 2D texture (= Numbers of my watch) and a rotating 2D texture (=neddle of my watch). The shaders can't be used for this (WP7 !!).

I did not find anything on this (books or internet).

There are 2 big problems for me : 1) load 2 textures on the same object. 2) rotating one of this 2D texture and update it on the 3D model.

algorithmic I use for is:

In LoadContent()

1) load 3D model + Final 2Dtexture + Basic 2Dtexture and rotating 2Dtextures
2) Apply final 2Dtexture on 3D object 3) Load RenderTarget2D and SpriteBatch

In Draw()

1)Use TargetRender as back buffer 2)draw Basic 2dTexture and Rotate Rotating 2Dtexture with spritebatch 3)put the back buffer into my Final 2DTexture 4) free the back buffer

But that's not working at all !!!

If you have idea or interesting links, thanks for help.

JeanGil

\$\endgroup\$
1
  • \$\begingroup\$ You really should split it into separate questions and go step by step. It doesn't make sense to think about rendering too much, when you don't have a working texture loader. My advice is: start a new question with the most basic of your requests here, I'd start with texture-loading. \$\endgroup\$ Commented May 30, 2011 at 9:37

2 Answers 2

1
\$\begingroup\$

I would create a seperate quad for the watch needle and rotate that instead. Remember you need to translate, rotate and then -translate to rotate around a specific point.

If you do this, your first question should be invalid. If you still wish to do this however, you could pack the two textures into one file, then play around with the UV's to get the right texture at the right part.

\$\endgroup\$
0
\$\begingroup\$

Since we can't solve all your requests in one question, my best advice is: search for tutorials with example programs.

Here is one for XNA on Windows 7 including texture-loading and rendering.

Alternatively, please ask one specific question to focus on.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .