1

这是我在 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
4

1 回答 1

1

Mono 仅支持 softfloat 模式,而大多数 RPi 操作系统默认为 hardfloat。我相信下一个单声道版本计划支持 hardfloat。如果你从 git repo 构建单声道源,你现在可以得到它。

于 2014-01-09T15:19:26.587 回答