LPD3DXBUFFER is 0xcccccccc

When I initilize an LPD3DXBUFFER, it is set to 0xcccccccc (which I found out using the debugger). As a result of this, LoadMeshFromX is failing. Here is the delcaration of the variable:

LPD3DXBUFFER matbuff;// is 0xcccccccc

it is just like the example provided by DX, why should this occur? If you would like, I will post the entire function. ( I am not sure why this text is green)

[494 byte] By [programmingisfun] at [2007-12-27]
# 1

A quick search in the documentation will reveal that 0xCCCCCCCC is a special code inserted by the VStudio debugger to indicate an uninitialized variable. It's intentionally put there as a flag to you indicating your code is badly written

I don't know the surrounding context, but you need to initialize it - either to NULL or actually create a buffer for the call you're trying to use.

hth
Jack

JackHoxley at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 2
thanks. For some reason, this post was marked as answered, even theough I still have problems, so I started a new thread, but now it is marked as unanswered, when it is better left as answered. sorry:)
programmingisfun at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 3

Often u have to initialize a stucture.

Return error:

DEVMODE* dm;

if ( !EnumDisplaySettings(dd.DeviceName, ENUM_CURRENT_SETTINGS, dm) )

return E_FAIL;

Correct way:

DEVMODE dm;

dm.dmSize = sizeof(DEVMODE);

if ( !EnumDisplaySettings(dd.DeviceName, ENUM_CURRENT_SETTINGS, &dm) )

return E_FAIL;

3Nu at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...