Skip to main content
gamedev.net
🔒 Locked

CreateIndexBuffer returning E_OUTOFMEMORY

Started by Zimans Jun 18, 2002 at 9:29 PM 2 replies 800+ views
Original Post
Zimans
Zimans
I''m trying to create an index buffer but I keep getting E_OUTOFMEMORY. The size my prog is trying to allocate is 996 bytes. I shouldn''t be out of memory. I tried making it smaller as well but that made no difference. I tried both 16-bit and 32-bit indicies. As well as how it is allocated and usage flags.. This is stumping me... Here''s the line of code: ret = Display->D3DDevice->CreateIndexBuffer ((Mesh.numTris * 3) * 2, D3DUSAGE_WRITEONLY, D3DFMT_INDEX16, D3DPOOL_MANAGED, &Mesh.Indicies); arggg -Zims
IndirectX
IndirectX
Surely you''re using the debug runtime and it''s of no help?
---visit #directxdev on afternet <- not just for directx, despite the name
JoeyBlow2
JoeyBlow2
I''ve seen this bug on Dual Processor computers. You have to specify the multiple CPU flag when creating the D3D device.
Zimans
Zimans
I figured it out. I was a little hasty in posting to the board as I was getting a bit agrevated.. Turns out it was the CreateVertexBuffer code before this code that was screwing it up.. I neglected to note that the size parameter was in bytes, not number of verts.. back in dx7 this was number of verts, so I guess I kinda just assumed.. (This is my first forray into dx8) I was creating a vertex buffer that was way too small and then running amok in memory filling it with verts. oops.

-Zims

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.