This project is read-only.
1

Closed

Android: DrawIndexedPrimitives

description

I don't know whether this is something that is being worked on but some of the GraphicsDevice members that are needed to achieve DrawIndexedPrimitives like .Indices seem to be missing.


My code below is where I put A4Game._graphicsDevice.Indices in a watch, I get "Unknown member: Indices". This member exists in the windows XNA build.
        A4Game._graphicsDevice.Indices = GetIndexBuffer();
        A4Game._graphicsDevice.SetVertexBuffer(GetVertexBuffer());
        A4Game._graphicsDevice.DrawIndexedPrimitives(PrimitiveType.LineList, 0, 0, GetVertexCount(), 0, GetIndex().Length / 2);
Output:

System.NotImplementedException: 10-27 12:55:40.663 I/MonoDroid( 987): UNHANDLED EXCEPTION: System.NotImplementedException: The requested feature is not implemented.10-27 12:55:40.663 I/MonoDroid( 987): at Microsoft.Xna.Framework.Graphics.RasterizerState.ApplyState (Microsoft.Xna.Framework.Graphics.GraphicsDevice) 10-27 12:55:40.663 I/MonoDroid( 987): at Microsoft.Xna.Framework.Graphics.GraphicsDevice.DrawIndexedPrimitives (Microsoft.Xna.Framework.Graphics.PrimitiveType,int,int,int,int,int) 10-27 12:55:40.663 I/MonoDroid( 987): at A4.Core.A4AxisGrid.Draw () [0x00023] in D:\code\A\A.Core\A4.Core\A4.Core.Android\model\A4AxisGrid.cs:5610-27 12:55:40.663 I/MonoDroid( 987): at A4.Core.A4Game.Draw (Microsoft.Xna.Framework.GameTime) [0x00033] in D:\code\A\A.Core\A4.Core\A4.Core.Android\A\A4Game.cs:18410-27 12:55:40.663 I/MonoDroid( 987): at Microsoft.Xna.Framework.Game.DoDraw (Microsoft.Xna.Framework.GameTime) 10-27 12:55:40.663 I/MonoDroid( 987): at Microsoft.Xna.Framework.Game.Tick () 10-27 12:55:40.663 I/MonoDroid( 987): at Microsoft.Xna.Framework.AndroidGameWindow.OnUpdateFrame (OpenTK.FrameEventArgs) 10-27 12:55:40.663 I/MonoDroid( 987): at OpenTK.Platform.Android.AndroidGameView.UpdateFrameInternal (OpenTK.FrameEventArgs) [0x0000c] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.2.6-branch/632e6ddf/source/monodroid/src/OpenGLES/Android/AndroidGameView.cs:29610-27 12:55:40.663 I/MonoDroid( 987): at OpenTK.Platform.Android.AndroidGameView.RunIteration (System.Threading.CancellationToken) [0x00084] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.2.6-branch/632e6ddf/source/monodroid/src/OpenGLES/Android/AndroidGameView.cs:45110-27 12:55:40.663 I/MonoDroid( 987): at OpenTK.Platform.Android.AndroidGameView/c__AnonStorey0.<>m__2 (object) [0x00000] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.2.6-branch/632e6ddf/source/monodroid/src/OpenGLES/Android/AndroidGameView.cs:36010-27 12:55:40.663 I/MonoDroid( 987): at Android.App.SyncContext/c__AnonStorey29.<>m__14 () [0x00000] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.2.6-branch/632e6ddf/source/monodroid/src/Mono.Android/src/Android.App/SyncContext.cs:3710-27 12:55:40.663 I/MonoDroid( 987): at Java.Lang.Thread/RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.2.6-branch/632e6ddf/source/monodroid/src/Mono.Android/src/Java.Lang/Thread.cs:3210-27 12:55:40.663 I/MonoDroid( 987): at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) [0x00008] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.2.6-branch/632e6ddf/source/monodroid/src/Mono.Android/platforms/android-8/src/generated/Java.Lang.IRunnable.cs:6910-27 12:55:40.663 I/MonoDroid( 987): at (wrapper dynamic-method) object.55148098-a17f-43a1-bda8-80284ac9c355 (intptr,intptr) Unhandled Exception: System.NotImplementedException: [ERROR] FATAL UNHANDLED EXCEPTION: System.NotImplementedException: The requested feature is not implemented. at Microsoft.Xna.Framework.Graphics.RasterizerState.ApplyState (Microsoft.Xna.Framework.Graphics.GraphicsDevice device) [0x00000] in :0 at Microsoft.Xna.Framework.Graphics.GraphicsDevice.ApplyState (Boolean applyShaders) [0x00000] in :0 at Microsoft.Xna.Framework.Graphics.GraphicsDevice.DrawIndexedPrimitives (PrimitiveType primitiveType, Int32 baseVertex, Int32 minVertexIndex, Int32 numbVertices, Int32 startIndex, Int32 primitiveCount) [0x00000] in :0 at A4.Core.A4AxisGrid.Draw () [0x00023] in D:\code\A\A.Core\A4.Core\A4.Core.Android\model\A4AxisGrid.cs:56 at A4.Core.A4AxisGrid.Render (Microsoft.Xna.Framework.Graphics.Effect p_currentEffect) [0x00025] in D:\code\A\A.Core\A4.Core\A4.Core.Android\model\A4AxisGrid.cs:49 at A4.Core.A4Camera.Render (Microsoft.Xna.Framework.Graphics.Effect p_currentEffect) 10-27 12:55:45.705 E/mono ( 987): 10-27 12:55:45.705 E/mono ( 987): Unhandled Exception:[0x0006c] in D:\code\A\A.Core\A4.Core\A4.Core.Android\A\A4Camera.cs:701 at A4.Core.A4Game.Draw (Microsoft.Xna.Framework.GameTime gameTime) [0x00033] in D:\code\A\A.Core\A4.Core\A4.Core.Android\A\A4Game.cs:184 at Microsoft.Xna.Framework.Game.DoDraw (Microsoft.Xna.Framework.GameTime gameTime) [0x00000] in :0 at Microsoft.Xna.Framework.Game.Tick () [0x00000] in :0 at Microsoft.Xna.Framework.AndroidGameWindow.OnUpdateFrame (OpenTK.FrameEventArgs e) [0x00000] in :0 at OpenTK.Platform.Android.AndroidGameView.UpdateFrameInternal (OpenTK.FrameEventArgs e) [0x0000c] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.2.6-branch/632e6ddf/source/monodroid/src/OpenGLES/Android/AndroidGameView.cs:296 at OpenTK.Platform.Android.AndroidGameView.RunIteration (CancellationToken token) [0x00084] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.2.6-branch/632e6ddf/source/monodroid/src/OpenGLES/Android/AndroidGameView.cs:10-27 12:55:45.705 E/mono ( 987): System.NotImplementedException: The requested feature is not implemented.10-27 12:55:45.705 E/mono ( 987): at Microsoft.Xna.Framework.Graphics.RasterizerState.ApplyState (Microsoft.Xna.Framework.Graphics.GraphicsDevice device) [0x00000] in :0 10-27 12:55:45.705 E/mono ( 987): at Microsoft.Xna.Framework.Graphics.GraphicsDevice.ApplyState (Boolean applyShaders) [0x00000] in :0 10-27 12:55:45.705 E/mono ( 987): at Microsoft.Xna.Framework.Graphics.GraphicsDevice.DrawIndexedPrimitives (PrimitiveType primitiveType, Int32 baseVertex, Int32 minVertexIndex, Int32 numbVertices, Int32 startIndex, Int32 primitiveCount) [0x00000] in :0 10-27 12:55:45.705 E/mono ( 987): at A4.Core.A4AxisGrid.Draw () [0x00023] in D:\code\A\A.Core\A4.Core\A4.Core.Android\model\A4AxisGrid.cs:56 The program 'Mono' has exited with code 255 (0xff).

file attachments

Closed May 28, 2016 at 8:52 PM by TomSpilman

comments

stark7 wrote Nov 2, 2012 at 2:20 AM

I attached the watch that shows .Indices missing (Android).

stark7 wrote Nov 3, 2012 at 4:30 AM

I tracked this issue down to using FillMode.WireFrame. This doesn't happen when i use FillMode.Solid.

wrote Feb 22, 2013 at 2:56 AM

wrote May 28, 2016 at 8:52 PM