这是我在 pi 论坛上的第一篇文章。我的 pi 昨天到了,我真的很高兴让我的应用程序在 pi 上运行。
我想做以下事情......我想用播放列表中的当前歌曲制作一个简单的播放列表。应该只显示前 4 首歌曲的封面。我已经使用 XNA 在 VB.Net 中完成了这项工作。我试图将它移植到monogame,GraphicsModeException
在PI上运行时使用OpenTK。
即使是一个小的"Hello World"
字符串渲染也会失败,并出现同样的异常。一切都是通过简单的 spritebatch 渲染完成的
有什么建议么 ?
编辑:来源和错误来源:https ://bitbucket.org/S3NS4Ti0N/coverflow-test
Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for OpenTK.Graphics.GraphicsContext ---> System.PlatformNotSupport edException: Please, refer to http://www.opentk.com for more information.
at OpenTK.Platform.Factory+UnsupportedPlatform.CreateGetCurrentGraphicsContext () [0x00000] in <filename unknown>:0
at OpenTK.Graphics.GraphicsContext..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Microsoft.Xna.Framework.OpenTKGameWindow.Initialize () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.OpenTKGameWindow..ctor () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.OpenTKGamePlatform..ctor (Microsoft.Xna.Framework.Game game) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.GamePlatform.Create (Microsoft.Xna.Framework.Game game) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.Game..ctor () [0x00000] in <filename unknown>:0
at CoverFlow.Game1..ctor () [0x00000] in <filename unknown>:0
at CoverFlow.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for OpenTK.Graphics.GraphicsContext ---> System.Plat formNotSupportedException: Please, refer to http://www.opentk.com for more information.
at OpenTK.Platform.Factory+UnsupportedPlatform.CreateGetCurrentGraphicsContext () [0x00000] in <filename unknown>:0
at OpenTK.Graphics.GraphicsContext..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Microsoft.Xna.Framework.OpenTKGameWindow.Initialize () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.OpenTKGameWindow..ctor () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.OpenTKGamePlatform..ctor (Microsoft.Xna.Framework.Game game) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.GamePlatform.Create (Microsoft.Xna.Framework.Game game) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.Game..ctor () [0x00000] in <filename unknown>:0
at CoverFlow.Game1..ctor () [0x00000] in <filename unknown>:0
at CoverFlow.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0