32bit or not 32bit

Started by
6 comments, last by Maddibob 19 years, 5 months ago
I'm storing my terrain vertices in a large vertex and index buffer and drawing the Octree'd terrain via indexes into the buffer. I have just gone over 65536 vertices, so I thought I might use D3DFMT_INDEX32 in the CreateIndexBuffer method to cope with the larger numbers. Every time I use D3DFMT_INDEX32 and change the index size to DWORDs, my PC locks up completely and I've actually lost a few files because of it. Before I wipe an important part of my operating system, does anyone know why this might happen? My video card the MaxVertexIndex is 16,777,215, so I guess it can handle 32 bit! Thanks
Advertisement
That has happened to me also, it was quite a pain in the butt. Unfortunately, I can't remember what the problem that was causing it was at the moment. I think it might have been that I was still accessing the mem through a WORD*, which would obviously create bad index values. There might have been something else however. Are you getting a BSOD that says PAGE_FAULT_IN_NON_PAGED_AREA or something like that? [assuming winxp, don't know what it would be in win98]

You shouldn 't have to worry about losing random files however, only ones that have been opened for writing and written to recently....I think...

If all else fails, use the debugging runtimes at max info level, and max validation and stuff and see if that helps
hm, maxvertexindex is 16,777,215?

That's only 24bit.. O_o
very strange.
As I don't have support for 32bit indices I haven't used them.
But I also had some crashes resulting in loss of several source files. :(
Quote:Original post by Madhed
hm, maxvertexindex is 16,777,215?

That's only 24bit.. O_o
very strange.

It seems reasonable. That's exactly the same number as the reference device uses for maxvertindex. It's just about 64MiB of index data - quite a lot I'd say [wink].

OP:
Have you already checked out the MSDN docs? IIRC there was a tutorial on how to use 32 bit indices.


Ah yes, I forgot to mention that there are no errors creating the buffer, it's just when I call DrawIndexedPrimitive (StreamSource is set up as this works fine for 16bit indices). It doesn't actually look like you can specify what index stride you're using or maybe I've missed something in that area?

It's always interesting when you know you're doing something so bad that it corrupts files on your hard disk!

I guess that big hole in my landscape will have to remain for a while longer.... :-)
Is your IB large enough? ie: when you create it and lock it, do you multiply by 2, by 4, by sizeof(short), sizeof(long), or what? It could be as simple as you haven't properly allocated or locked your buffer.

On a GeForce3 I get a MaxPrimitiveCount and MaxVertexIndex of 1,048,575. This is odd, since I was pretty sure this card only supported index16. Maybe newer drivers gave me 32 bit indices.
Yes, IB all set up correctly with the correct sizes (DWORD) and multiplied by numverts per poly, etc.

My card is fairly new (2 months), so maybe that's why the indexrange is so high. I'd never get past around 200k verts I think, it's annoying how everything appears fine and it still cacks out.
Yes, IB all set up correctly with the correct sizes (DWORD) and multiplied by numverts per poly, etc.

My card is fairly new (2 months), so maybe that's why the indexrange is so high. I'd never get past around 200k verts I think, it's annoying how everything appears fine and it still cacks out.

This topic is closed to new replies.

Advertisement