I am getting a error when trying to draw a line with thickness and fill options
System.ArgumentOutOfRangeException
HResult=0x80131502
Message=Specified argument was out of the range of valid values.
Parameter name: primitiveCount
Source=MonoGame.Framework
StackTrace:
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.DrawUserPrimitives[T](PrimitiveType primitiveType, T[] vertexData, Int32 vertexOffset, Int32 primitiveCount, VertexDeclaration vertexDeclaration)
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.DrawUserPrimitives[T](PrimitiveType primitiveType, T[] vertexData, Int32 vertexOffset, Int32 primitiveCount)
at RetroLib.Library.Gfx.Draw() in C:\Users\Shadowblitz16\source\repos\RetroLib\RetroLib\Library\Gfx.cs:line 110
at RetroLib.Game.GameManager.Draw(GameTime gameTime) in C:\Users\Shadowblitz16\source\repos\RetroLib\RetroLib\Game.cs:line 124
at Microsoft.Xna.Framework.Game.DoDraw(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop()
at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
at RetroLib.Game.Run(Game game, GameConfig config) in C:\Users\Shadowblitz16\source\repos\RetroLib\RetroLib\Game.cs:line 147
at RetroLib.Program.Main() in C:\Users\Shadowblitz16\source\repos\RetroLib\RetroLib\Program.cs:line 12
I am also trying to support primitive combining in which you can set draw mode to combine and it draws vertices together from line, rect, and circ functions
here is a pastebin of my code https://pastebin.com/k44BuFHw
beware it’s pretty long