This project is read-only.

Test application crashes on Panoramic view on HTC HD2

Aug 12, 2010 at 10:21 AM
First off, I like silvermoon a lot, have been doing some small test apps with the Beta 2, now trying to rebuild them to Beta3 but I ran into a small problem. While running the Test application, either the binary version from the or compiled from source it keeps chrasing when selecting the "Panoramic View". Point of failure is the contructor of the texture class as gl.GenTexture(); returns 0. This is probably caused by a context/threading issue, since all other texture constructor calls succeed. By modifying PanoramaImageLoader.cs to load the texture outside the thread (I know defeats the point of the thread) the problem was solved. Hope this helps somebody, if anybody has a better solution, please let me know! private PanoramaImageLoader() : base() { Image = Texture.FromResource("Testing.Images.panoramic.jpg", TextureFormat.RGB565); Thread t = new Thread(LoadImage); t.Priority = ThreadPriority.Lowest; t.Start(); } private void LoadImage() { //Image = Texture.FromResource("Testing.Images.panoramic.jpg", TextureFormat.RGB565); Loaded(this, EventArgs.Empty); }
Aug 12, 2010 at 8:24 PM
Edited Aug 12, 2010 at 8:25 PM
On HTC HD2, it's not possible to create Texture (glGenTexture) in separated thread (It will return 0 which will fire the exception). Remove the thread and call LoadImage directly will solve. -- Mozeal