Forum
Contact





DirectX using C#
DirectX using C++
DirectX using Visual Basic



Latest Forum posts

 Tutorial 3 for Windows Phone 7
  Posted by: Anonymous
  When: 20/05/2013 at 02:30:13

 No download link for 2d series: shooter
  Posted by: zaboleq
  When: 07/05/2013 at 15:46:28

 Collision Class?
  Posted by: Anonymous
  When: 05/05/2013 at 19:03:59

 stack overflow
  Posted by: cityguy
  When: 07/04/2013 at 01:58:38

 Meshes looks strange.
  Posted by: ab_saratov
  When: 01/04/2013 at 04:31:08

 Lamppost Not loaded
  Posted by: Anonymous
  When: 22/03/2013 at 06:43:52

 Collision Class?
  Posted by: Da_Boom
  When: 21/03/2013 at 01:23:09

 Math boggles me
  Posted by: cityguy
  When: 17/03/2013 at 03:44:48

 Collision Class?
  Posted by: Da_Boom
  When: 16/03/2013 at 03:44:42

 Tree update
  Posted by: Anonymous
  When: 15/03/2013 at 21:11:22

 XNA 4.0
  Posted by: Anonymous
  When: 15/03/2013 at 19:43:57

 Error when I try to run.
  Posted by: Anonymous
  When: 15/03/2013 at 19:21:06

 Error With the Effect File
  Posted by: Anonymous
  When: 15/03/2013 at 18:21:01

 Can only get shadowmap
  Posted by: Anonymous
  When: 15/03/2013 at 15:48:52

 Vertex and Pixel Shader Versions?
  Posted by: Anonymous
  When: 15/03/2013 at 15:07:16

 Unsupported properties
  Posted by: Anonymous
  When: 15/03/2013 at 14:23:00

 Problem Loading Skybox
  Posted by: Rana
  When: 15/03/2013 at 10:34:45

 Black Screen Of Death - Help!
  Posted by: Anonymous
  When: 15/03/2013 at 03:43:43

 2.0 anyone?
  Posted by: Anonymous
  When: 15/03/2013 at 02:19:48

 Defitinition of tha rotation axis
  Posted by: Anonymous
  When: 15/03/2013 at 00:55:14




Topic: Device does not support 32-bit index



  
Goto parent category
  
Create a new user account


   Device does not support 32-bit index
 Poster : idirtyjeans
 Posts: 2
 Country : Bangladesh
 City: Dhaka

  
Posted by idirtyjeans on 30/08/2008 at 22:06:40
Hello Riemer

When I ran your code I got this exception: "This device does not support 32-bit indices.  Use IndexElementSize.SixteenBits or a type that has a size of two bytes."

What would be the solution to this problem by changing only the code - not my hardware? Please let me know.

Niaz

:)
 Poster : kigunda
 Posts: 7
 Country : Kenya
 City: Nairobi

  
Posted by kigunda on 31/08/2008 at 17:46:02
I found the same problem, i saw a post about that - you most likely have an intel gpu.

In what series and at what point of that code does it occur?

if its at the index buffer of the 4th series then change the values of index buffer to short like this


short[] terrainIndices = new short[(WIDTH - 1) * (HEIGHT - 1) * 6];
            for (int x = 0; x < WIDTH - 1; x++)
            {
                for (int y = 0; y < HEIGHT - 1; y++)
                {
                    terrainIndices[(x + y * (WIDTH - 1)) * 6] = (short)((x + 1) + (y + 1) * WIDTH);
                    terrainIndices[(x + y * (WIDTH - 1)) * 6 + 1] = (short)((x + 1) + y * WIDTH);
                    terrainIndices[(x + y * (WIDTH - 1)) * 6 + 2] = (short)(x + y * WIDTH);

                    terrainIndices[(x + y * (WIDTH - 1)) * 6 + 3] = (short)((x + 1) + (y + 1) * WIDTH);
                    terrainIndices[(x + y * (WIDTH - 1)) * 6 + 4] = (short)(x + y * WIDTH);
                    terrainIndices[(x + y * (WIDTH - 1)) * 6 + 5] = (short)(x + (y + 1) * WIDTH);
                }
            }

            terrainIndexBuffer = new IndexBuffer(device, typeof(short), (WIDTH - 1) * (HEIGHT - 1) * 6, ResourceUsage.WriteOnly, ResourceManagementMode.Automatic);
            terrainIndexBuffer.SetData(terrainIndices);



Its 2 a.m. here and i am tired so expect typos
 Poster : BlueAnorak
 Posts: 1
 Country : United Kingdom
 City: Herts

  
Posted by BlueAnorak on 13/09/2008 at 19:17:42
Changing the line where the error occurs to the following should cure the problem:-

    myIndexBuffer = new IndexBuffer(device, typeof(short), indices.Length, BufferUsage.WriteOnly);

 Poster : Anonymous
 Posts:
 Country :
 City:

  
Posted by Anonymous on 17/02/2010 at 12:25:48
I've been looking for a workaround because I too am also getting this error, and I tried the method where you change it to short, as shown below:

myIndexBuffer = new IndexBuffer(device, typeof(int), indices.Length, BufferUsage.WriteOnly);


But doing so gives me a new error:

Invalid Operation Exception:
The array is not the correct size for the amount of data requested.

For the following code:

myIndexBuffer.SetData(indices);


As I stated, I've tried many workaroudns, including the methods shown above, only to run into even more errors. Any and all help would be much appreciated.
 Poster : Anonymous
 Posts:
 Country :
 City:

  
Posted by Anonymous on 03/04/2010 at 21:36:19
Hi there i just found this topic, May i ask if there's a way to make the terrain wider for the device that does not support 32-bit index?


Thanks ;D
 Poster : Anonymous
 Posts:
 Country :
 City:

  
Posted by Anonymous on 31/03/2011 at 05:54:39
8Z9zj3  <a href="http://nbrvigrmsjzn.com/">nbrvigrmsjzn</a>, [url=http://teftuykdqvuy.com/]teftuykdqvuy[/url], [link=http://zouphurnhrwn.com/]zouphurnhrwn[/link], http://aruxfncalvoo.com/
 Poster : Anonymous
 Posts:
 Country :
 City:

  
Posted by Anonymous on 09/01/2012 at 15:39:00
correct code for 16 bit indices in XNA 4.0:
myIndexBuffer = new IndexBuffer(device, IndexElementSize.SixteenBits, indices.Length, BufferUsage.WriteOnly);
 Poster : Scotticus
 Posts: 1
 Country : USA
 City: Narragansett, RI

  
Posted by Scotticus on 12/01/2012 at 08:39:19
I would like to update the Series #2 Tutorial (Basic Terrain) in XNA 4.0 for the Reach setting.

I have made the changes of converting the Index Buffer to 16-Bit mode, then converting many pieces of data to "short" instead of integer.

One thought was to break the terrain into four sections and drawing them out individually.

I have been looking into Riemer's Quadtree tutorial from chapter 2 in his XNA book.  Anyone know if that is going in the right direction or maybe point me in the right direction?

I am thinking there are many "Reach" users out there with Intel GPU-based laptops out there, so I would like to find a solution that may help with all the tutorials.
Thanks!

  
Post a new reply
 





Google
 
Web www.riemers.net
If you appreciate the amount of time I spend creating and updating
these pages, feel free to donate -- any amount is welcome !
- Website design & DirectX code : Riemer Grootjans -
©2006 Riemer Grootjans


News
Home
Forum
XNA 2.0 Recipes Book (8)
XNA 3.0 Recipes Book (8)
Downloads
Extra Reading (3)
Matrices: geometrical
Matrix Mathematics
Homogenous matrices
Community Projects (1)
Tutorials (160)
XNA 4.0 using C# (89)
DirectX using C# (54)
Series 1:Terrain (14)
Opening a window
Linking to the Device
Drawing a triangle
Camera
Rotation - Translation
Indices
Terrain creation
Terrain from file
DirectInput
Importing bmp files
Colored vertices
DirectX Light basics
Mesh creation
Mesh lighting
Series 2: Flightsim (19)
Series 3: HLSL (19)
Short Tuts (2)
Resizing problem
Checking Device caps
DirectX using C++ (15)
DirectX using VB (2)