Sign in to follow this  
Maddibob

32bit or not 32bit

Recommended Posts

Maddibob    142
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
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

Share this post


Link to post
Share on other sites
Madhed    4095
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. :(

Share this post


Link to post
Share on other sites
darookie    1441
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.


Share this post


Link to post
Share on other sites
Maddibob    142
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.... :-)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Maddibob    142
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.

Share this post


Link to post
Share on other sites
Maddibob    142
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this