Hello,
I’m trying to get a Windows GL version of my game running. I’ve had some success with the DirectX version, but when the GL version boots:
A first chance exception of type ‘Microsoft.Xna.Framework.Graphics.MonoGameGLException’ occurred in MonoGame.Framework.dll
An unhandled exception of type ‘Microsoft.Xna.Framework.Graphics.MonoGameGLException’ occurred in MonoGame.Framework.dll
Additional information: GL.GetError() returned InvalidValue
with the callstack:
MonoGame.Framework.dll!Microsoft.Xna.Framework.Graphics.VertexBuffer.SetBufferData(int bufferSize, int elementSizeInBytes, int offsetInBytes, ParticleVertex data, int startIndex, int elementCount, int vertexStride, Microsoft.Xna.Framework.Graphics.SetDataOptions options) Line 167 C#
MonoGame.Framework.dll!Microsoft.Xna.Framework.Graphics.VertexBuffer.PlatformSetDataInternal(int offsetInBytes, ParticleVertex data, int startIndex, int elementCount, int vertexStride, Microsoft.Xna.Framework.Graphics.SetDataOptions options, int bufferSize, int elementSizeInBytes) Line 136 C#
MonoGame.Framework.dll!Microsoft.Xna.Framework.Graphics.VertexBuffer.SetDataInternal(int offsetInBytes, ParticleVertex data, int startIndex, int elementCount, int vertexStride, Microsoft.Xna.Framework.Graphics.SetDataOptions options) Line 108 C#
MonoGame.Framework.dll!Microsoft.Xna.Framework.Graphics.DynamicVertexBuffer.SetData(int offsetInBytes, ParticleVertex data, int startIndex, int elementCount, int vertexStride, Microsoft.Xna.Framework.Graphics.SetDataOptions options) Line 72 C#
Miasma2Mono.exe!ParticleSystem.AddNewParticlesToVertexBuffer() Line 475 C#
Miasma2Mono.exe!ParticleSystem.Draw() Line 400 C#
Miasma2Mono.exe!GraphicsManager.DrawComponents(LightingSetup lightCfg) Line 1217 C#
Miasma2Mono.exe!SceneRendering.DrawView(RenderView view, bool isMainLayer) Line 82 C#
Miasma2Mono.exe!Miasma.Miasma2Game.Draw(Microsoft.Xna.Framework.GameTime gameTime) Line 566 C#
MonoGame.Framework.dll!Microsoft.Xna.Framework.Game.DoDraw(Microsoft.Xna.Framework.GameTime gameTime) Line 673 C#
MonoGame.Framework.dll!Microsoft.Xna.Framework.Game.Tick() Line 508 C#
MonoGame.Framework.dll!Microsoft.Xna.Framework.OpenTKGamePlatform.RunLoop() Line 155 C#
MonoGame.Framework.dll!Microsoft.Xna.Framework.Game.Run(Microsoft.Xna.Framework.GameRunBehavior runBehavior) Line 403 C#
MonoGame.Framework.dll!Microsoft.Xna.Framework.Game.Run() Line 376 C#
Miasma2Mono.exe!Miasma.Program.Run<Miasma.Miasma2Game>() Line 27 C#
Miasma2Mono.exe!Miasma.Program.Main(string args) Line 16 C#
[External Code]
Any idea what is going on there?
I had to change quite a lot of shader effect parameter setting, I think because the shader compiler optimised them out. (I now check if they exist before setting them.)
Also, the game currently boots up and only shows a red screen. Possibly related?
Any and all input welcome!
Thanks,
David