Sign in to follow this  

Wierd problem!?

This topic is 4780 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm attempting to create a mesh with D3DXCreateMeshFVF, but i'm recieving some really wierd debug errors. The actual call to D3DXCreateMeshFVF works fine and i've filled the vertex, index and attribute buffers of the mesh object. My device->Clear() call returns an OUT_OF_MEMORY error and D3D debug starts spitting out:
First-chance exception at 0x77f8c446 in win32Build.exe: 0xC0000005: Access violation writing location 0x3ef5918e.
Direct3D8: (WARN) :Alloc of size 76 FAILED!
First-chance exception at 0x77f8c446 in win32Build.exe: 0xC0000005: Access violation writing location 0x3ef5918e.
Direct3D8: (WARN) :Alloc of size 44 FAILED!
Direct3D8: (ERROR) :failed to allocate space for rects

First-chance exception at 0x7c59bbf3 in win32Build.exe: Microsoft C++ exception: long @ 0x0012fa10.
Direct3D8: (ERROR) :Clear failed.
I'm not even attempting to draw the mesh or anything. I'm just running clear, beginscene, endscene and present... Any clues?

Share this post


Link to post
Share on other sites
By using D3DFVF_TEX0, you were telling DirectX that you had no texture coordinates. Therefore, DirectX didn't allocate any memory for the texture coordinates and expected your vertex structure to be of a certain size. Then, you presumably stuffed vertices with texture coordinates into the mesh. Since the actual data didn't match the FVF you specified, the whole process went a bit pair-shaped.

Share this post


Link to post
Share on other sites

This topic is 4780 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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