Tilemap causes InvalidOperationException
by Duane Wandless · in Torque X Platformer Kit · 03/25/2008 (11:35 am) · 6 replies
I'm using Torque X 2.0 XNA 2.0 and the platform SDK 1.5. I successfully upgraded everything to use XNA 2.0. I know this exception is caused by my laptop's poor graphics card. The problem only starts to happen when I add a tilemap.
My question is, if I purchase the indie license (and therefore have access to the code) can I easily fix this 16-bit issue so it will run on my poor laptop? Or should I just wait until I upgrade my laptop?
Full exception message is:
This device does not support 32-bit indices. Use IndexElementSize.SixteenBits or a type that has a size of two bytes.
partial stack trace is:
Microsoft.Xna.Framework.Graphics.DynamicIndexBuffer..ctor(GraphicsDevice graphicsDevice, Int32 sizeInBytes, BufferUsage usage, IndexElementSize elementSize)
at GarageGames.Torque.Core.ResourceManager.CreateIndexBuffer(D3DIndexBufferProfile profile, Int32 sizeInBytes, IndexElementSize indexElementSize)
at GarageGames.Torque.T2D.T2DTileLayer.Render
My question is, if I purchase the indie license (and therefore have access to the code) can I easily fix this 16-bit issue so it will run on my poor laptop? Or should I just wait until I upgrade my laptop?
Full exception message is:
This device does not support 32-bit indices. Use IndexElementSize.SixteenBits or a type that has a size of two bytes.
partial stack trace is:
Microsoft.Xna.Framework.Graphics.DynamicIndexBuffer..ctor(GraphicsDevice graphicsDevice, Int32 sizeInBytes, BufferUsage usage, IndexElementSize elementSize)
at GarageGames.Torque.Core.ResourceManager.CreateIndexBuffer(D3DIndexBufferProfile profile, Int32 sizeInBytes, IndexElementSize indexElementSize)
at GarageGames.Torque.T2D.T2DTileLayer.Render
#2
10/21/2008 (7:40 am)
No I never did resolve that issue. Updating to a better graphics card did help.
#3
John K.
10/21/2008 (8:50 am)
Interesting, I've just checked the code and just about everywhere is uses IndexElementSize.SixteenBits. But, in T2DTileLayer.cs, the Render() method uses IndexElementSize.ThirtyTwoBits. I'll try changing this to IndexElementSize.SixteenBits to see what happens. If it still works, then my answer to you is probably yes - purchasing pro will let you make the change. John K.
#4
10/21/2008 (8:56 am)
No I never did resolve that issue. Updating to a better graphics card did help.
#5
There might be a way to still do this, but it will probably take some deeper digging.
John K.
10/21/2008 (9:42 am)
Doesn't seem to work. Changing it over to IndexElementSize.SixteenBits distorts the tile layer. Here's how it looks...
There might be a way to still do this, but it will probably take some deeper digging.
John K.
#6
10/21/2008 (12:20 pm)
Because it seems to be an error caused by the graphics card, this exception occurs with every tilemap, if you are using the platformer kit or any other 2D game.
Torque Owner Robert Finnie
Did you fix this problem, I'm having exactly the same problem.,
Any help would be greatly appreciated
many thanks
bob