windows phone 7 - How to initialize the GraphicsDevice? -


i trying texture2d photochooser. got photoresult.chosenphoto stream tried using texture2d.fromstream graphicsdevice null. should do? fyi - doing in xna-wp7 in optionmenuscreen , want use later in gameplayscreen. grephicsdevice constructor complicated initialize think there must simpler way. please help! thanks

{            if (result.taskresult == taskresult.ok)             {                                                       bmp = new bitmapimage();                  bmp.setsource(result.chosenphoto); 
                 photorecieved =texture2d.fromstream( graphicsdevice, result.chosenphoto);                                }                  } 

you should able graphics class located in game class.


Comments